Skip to content

Commit 481675c

Browse files
committed
prettier and type fix
1 parent 4c6c038 commit 481675c

4 files changed

Lines changed: 20 additions & 21 deletions

File tree

components/auth/LegislatorSignUpModal.tsx

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,7 @@ import { useEffect, useMemo, useState } from "react"
22
import clsx from "clsx"
33
import type { ModalProps } from "react-bootstrap"
44
import { useForm } from "react-hook-form"
5-
import {
6-
Alert,
7-
Button,
8-
Col,
9-
Form,
10-
Modal,
11-
Row,
12-
Stack
13-
} from "../bootstrap"
5+
import { Alert, Button, Col, Form, Modal, Row, Stack } from "../bootstrap"
146
import { LoadingButton } from "../buttons"
157
import Input from "../forms/Input"
168
import PasswordInput from "../forms/PasswordInput"
@@ -58,10 +50,7 @@ export default function LegislatorSignUpModal({
5850
const { claimedCodes } = useClaimedMemberCodes()
5951

6052
const memberIndex = useMemo(() => {
61-
const all = [
62-
...(index?.representatives ?? []),
63-
...(index?.senators ?? [])
64-
]
53+
const all = [...(index?.representatives ?? []), ...(index?.senators ?? [])]
6554
if (!claimedCodes) return all
6655
return all.filter(m => !claimedCodes.has(m.MemberCode))
6756
}, [index, claimedCodes])
@@ -182,7 +171,9 @@ export default function LegislatorSignUpModal({
182171
t("searchLegislators") ?? "Search by name or district..."
183172
}
184173
menuPortalTarget={document.body}
185-
styles={{ menuPortal: base => ({ ...base, zIndex: 9999 }) }}
174+
styles={{
175+
menuPortal: (base: any) => ({ ...base, zIndex: 9999 })
176+
}}
186177
/>
187178
{memberError && (
188179
<Form.Text className="text-danger">{memberError}</Form.Text>

components/auth/ProfileTypeModal.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,7 @@ export default function ProfileTypeModal({
103103

104104
<Col>
105105
<p>
106-
<b>
107-
{t("legislator") ?? "Legislator"}
108-
</b>
106+
<b>{t("legislator") ?? "Legislator"}</b>
109107
</p>
110108
<p>
111109
{t("legislatorDescription") ??

components/moderation/ListProfiles.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ const UserRoleToolBar = () => {
4343
}
4444

4545
const pendingCount =
46-
(data?.filter(
46+
data?.filter(
4747
d => d.role === "pendingUpgrade" || d.role === "pendingLegislator"
48-
).length ?? 0)
48+
).length ?? 0
4949

5050
const fakeOrgRequest = useCallback(async () => {
5151
const uid = nanoid(8)
@@ -64,7 +64,12 @@ const UserRoleToolBar = () => {
6464
<Toolbar sx={{ width: "100%", justifyContent: "space-between" }}>
6565
<div>Upgrade Requests: {pendingCount} pending upgrades</div>
6666
<ButtonGroup title="Show only: ">
67-
{["pendingUpgrade", "organization", "pendingLegislator", "legislator"].map(role => {
67+
{[
68+
"pendingUpgrade",
69+
"organization",
70+
"pendingLegislator",
71+
"legislator"
72+
].map(role => {
6873
return (
6974
<Button
7075
key={role}

functions/src/profile/finishSignup.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ import { checkRequestZod, checkAuth } from "../common"
55
import { setRole } from "../auth"
66

77
const CreateProfileRequest = z.object({
8-
requestedRole: z.enum(["user", "organization", "pendingUpgrade", "pendingLegislator"])
8+
requestedRole: z.enum([
9+
"user",
10+
"organization",
11+
"pendingUpgrade",
12+
"pendingLegislator"
13+
])
914
})
1015

1116
export const finishSignup = functions.https.onCall(async (data, context) => {

0 commit comments

Comments
 (0)