From 922bc6a1f52d8f01600e9a61ce31963075ec59a5 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Thu, 22 Aug 2024 00:46:06 +0900 Subject: refactor(frontend): organize PlayerInfo --- .../app/components/GolfPlayApps/GolfPlayAppGaming.tsx | 16 ++++++++-------- .../app/components/GolfPlayApps/GolfPlayAppWaiting.tsx | 10 +++++----- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'frontend/app/components/GolfPlayApps') diff --git a/frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx b/frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx index e6cb7e9..38516bc 100644 --- a/frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx +++ b/frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx @@ -1,7 +1,7 @@ import { Link } from "@remix-run/react"; import React, { useRef } from "react"; import SubmitButton from "../../components/SubmitButton"; -import type { PlayerInfo } from "../../models/PlayerInfo"; +import type { PlayerInfo } from "../../types/PlayerInfo"; import BorderedContainer from "../BorderedContainer"; import SubmitResult from "../Gaming/SubmitResult"; import UserIcon from "../UserIcon"; @@ -10,7 +10,7 @@ type Props = { gameDisplayName: string; gameDurationSeconds: number; leftTimeSeconds: number; - playerInfo: Omit; + playerInfo: PlayerInfo; problemTitle: string; problemDescription: string; onCodeChange: (code: string) => void; @@ -55,15 +55,15 @@ export default function GolfPlayAppGaming({
-
{playerInfo.score}
+
{playerInfo.state.score}
Player 1
-
{playerInfo.displayName}
+
{playerInfo.profile.displayName}
- {playerInfo.iconPath && ( + {playerInfo.profile.iconPath && ( )} @@ -88,7 +88,7 @@ export default function GolfPlayAppGaming({
提出 diff --git a/frontend/app/components/GolfPlayApps/GolfPlayAppWaiting.tsx b/frontend/app/components/GolfPlayApps/GolfPlayAppWaiting.tsx index a31e5f4..706dc8f 100644 --- a/frontend/app/components/GolfPlayApps/GolfPlayAppWaiting.tsx +++ b/frontend/app/components/GolfPlayApps/GolfPlayAppWaiting.tsx @@ -1,14 +1,14 @@ -import { PlayerInfo } from "../../models/PlayerInfo"; -import PlayerProfile from "../PlayerProfile"; +import type { PlayerProfile } from "../../types/PlayerProfile"; +import PlayerNameAndIcon from "../PlayerNameAndIcon"; type Props = { gameDisplayName: string; - playerInfo: Omit; + playerProfile: PlayerProfile; }; export default function GolfPlayAppWaiting({ gameDisplayName, - playerInfo, + playerProfile, }: Props) { return (
@@ -16,7 +16,7 @@ export default function GolfPlayAppWaiting({
{gameDisplayName}
- +
); -- cgit v1.2.3-70-g09d2