diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-08-01 22:22:12 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-08-01 22:22:12 +0900 |
| commit | 8f2cceacc8fde328033de7f05bb12e7b1246dd86 (patch) | |
| tree | acb93a52454315c286b9e0f3c624ae1bbcfa32f5 /frontend/app/routes/golf.$gameId.watch.tsx | |
| parent | 00e50b2dcfed209669c46da54dc07905d65887b8 (diff) | |
| download | phperkaigi-2025-albatross-8f2cceacc8fde328033de7f05bb12e7b1246dd86.tar.gz phperkaigi-2025-albatross-8f2cceacc8fde328033de7f05bb12e7b1246dd86.tar.zst phperkaigi-2025-albatross-8f2cceacc8fde328033de7f05bb12e7b1246dd86.zip | |
chore(frontend): [biome] format
Diffstat (limited to 'frontend/app/routes/golf.$gameId.watch.tsx')
| -rw-r--r-- | frontend/app/routes/golf.$gameId.watch.tsx | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/frontend/app/routes/golf.$gameId.watch.tsx b/frontend/app/routes/golf.$gameId.watch.tsx index 0f0e085..0203e27 100644 --- a/frontend/app/routes/golf.$gameId.watch.tsx +++ b/frontend/app/routes/golf.$gameId.watch.tsx @@ -7,40 +7,40 @@ import GolfWatchApp from "../components/GolfWatchApp.client"; import GolfWatchAppConnecting from "../components/GolfWatchApps/GolfWatchAppConnecting"; export const meta: MetaFunction<typeof loader> = ({ data }) => { - return [ - { - title: data - ? `Golf Watching ${data.game.display_name} | iOSDC Japan 2024 Albatross.swift` - : "Golf Watching | iOSDC Japan 2024 Albatross.swift", - }, - ]; + return [ + { + title: data + ? `Golf Watching ${data.game.display_name} | iOSDC Japan 2024 Albatross.swift` + : "Golf Watching | iOSDC Japan 2024 Albatross.swift", + }, + ]; }; export async function loader({ params, request }: LoaderFunctionArgs) { - const { token } = await isAuthenticated(request, { - failureRedirect: "/login", - }); + const { token } = await isAuthenticated(request, { + failureRedirect: "/login", + }); - const fetchGame = async () => { - return (await apiGetGame(token, Number(params.gameId))).game; - }; - const fetchSockToken = async () => { - return (await apiGetToken(token)).token; - }; + const fetchGame = async () => { + return (await apiGetGame(token, Number(params.gameId))).game; + }; + const fetchSockToken = async () => { + return (await apiGetToken(token)).token; + }; - const [game, sockToken] = await Promise.all([fetchGame(), fetchSockToken()]); - return { - game, - sockToken, - }; + const [game, sockToken] = await Promise.all([fetchGame(), fetchSockToken()]); + return { + game, + sockToken, + }; } export default function GolfWatch() { - const { game, sockToken } = useLoaderData<typeof loader>(); + const { game, sockToken } = useLoaderData<typeof loader>(); - return ( - <ClientOnly fallback={<GolfWatchAppConnecting />}> - {() => <GolfWatchApp game={game} sockToken={sockToken} />} - </ClientOnly> - ); + return ( + <ClientOnly fallback={<GolfWatchAppConnecting />}> + {() => <GolfWatchApp game={game} sockToken={sockToken} />} + </ClientOnly> + ); } |
