mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-08-27 21:55:15 -05:00
Migrate Prettier/Eslint/Stylelint setup to Biome (#1772)
* Initial * CSS lint * Test CI * Add 1v1, 2v2, and 3v3 Tags (#1771) * Initial * CSS lint * Test CI * Rename step --------- Co-authored-by: xi <104683822+ximk@users.noreply.github.com>
This commit is contained in:
@@ -8,42 +8,42 @@ import { FRIEND_CODE_REGEXP_PATTERN } from "~/features/sendouq/q-constants";
|
||||
import { SENDOUQ_PAGE } from "~/utils/urls";
|
||||
|
||||
export function FriendCodeInput({
|
||||
friendCode,
|
||||
friendCode,
|
||||
}: {
|
||||
friendCode?: string | null;
|
||||
friendCode?: string | null;
|
||||
}) {
|
||||
const fetcher = useFetcher();
|
||||
const { t } = useTranslation(["common"]);
|
||||
const fetcher = useFetcher();
|
||||
const { t } = useTranslation(["common"]);
|
||||
|
||||
return (
|
||||
<fetcher.Form method="post" action={SENDOUQ_PAGE}>
|
||||
<div
|
||||
className={clsx("stack sm horizontal items-end", {
|
||||
"justify-center": friendCode,
|
||||
})}
|
||||
>
|
||||
<div>
|
||||
{!friendCode ? (
|
||||
<Label htmlFor="friendCode">{t("common:fc.title")}</Label>
|
||||
) : null}
|
||||
{friendCode ? (
|
||||
<div className="font-bold">SW-{friendCode}</div>
|
||||
) : (
|
||||
<Input
|
||||
leftAddon="SW-"
|
||||
id="friendCode"
|
||||
name="friendCode"
|
||||
pattern={FRIEND_CODE_REGEXP_PATTERN}
|
||||
placeholder="1234-5678-9012"
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
{!friendCode ? (
|
||||
<SubmitButton _action="ADD_FRIEND_CODE" state={fetcher.state}>
|
||||
Save
|
||||
</SubmitButton>
|
||||
) : null}
|
||||
</div>
|
||||
</fetcher.Form>
|
||||
);
|
||||
return (
|
||||
<fetcher.Form method="post" action={SENDOUQ_PAGE}>
|
||||
<div
|
||||
className={clsx("stack sm horizontal items-end", {
|
||||
"justify-center": friendCode,
|
||||
})}
|
||||
>
|
||||
<div>
|
||||
{!friendCode ? (
|
||||
<Label htmlFor="friendCode">{t("common:fc.title")}</Label>
|
||||
) : null}
|
||||
{friendCode ? (
|
||||
<div className="font-bold">SW-{friendCode}</div>
|
||||
) : (
|
||||
<Input
|
||||
leftAddon="SW-"
|
||||
id="friendCode"
|
||||
name="friendCode"
|
||||
pattern={FRIEND_CODE_REGEXP_PATTERN}
|
||||
placeholder="1234-5678-9012"
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
{!friendCode ? (
|
||||
<SubmitButton _action="ADD_FRIEND_CODE" state={fetcher.state}>
|
||||
Save
|
||||
</SubmitButton>
|
||||
) : null}
|
||||
</div>
|
||||
</fetcher.Form>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user