aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-07-23 21:21:51 +0900
committernsfisis <nsfisis@gmail.com>2024-07-23 22:00:35 +0900
commit20c4d9e8ba120fefca3cc1e91119f55186cc793b (patch)
tree9e61703ed217b20d8439fab15afca68b20882c2f
parent65227f15a4e92fdd7b2fabe5bac797f293da683e (diff)
downloadiosdc-japan-2024-albatross-20c4d9e8ba120fefca3cc1e91119f55186cc793b.tar.gz
iosdc-japan-2024-albatross-20c4d9e8ba120fefca3cc1e91119f55186cc793b.tar.zst
iosdc-japan-2024-albatross-20c4d9e8ba120fefca3cc1e91119f55186cc793b.zip
frontend: format
-rw-r--r--frontend/src/routes/golf/play/App.tsx4
-rw-r--r--frontend/src/routes/golf/play/apps/Connecting.tsx4
-rw-r--r--frontend/src/routes/golf/play/apps/Failed.tsx4
-rw-r--r--frontend/src/routes/golf/play/apps/Finished.tsx4
-rw-r--r--frontend/src/routes/golf/play/apps/Gaming.tsx4
-rw-r--r--frontend/src/routes/golf/play/apps/Starting.tsx4
-rw-r--r--frontend/src/routes/golf/play/apps/Waiting.tsx4
-rw-r--r--frontend/src/routes/golf/watch/App.tsx4
-rw-r--r--frontend/src/routes/golf/watch/apps/Connecting.tsx4
-rw-r--r--frontend/src/routes/golf/watch/apps/Failed.tsx4
-rw-r--r--frontend/src/routes/golf/watch/apps/Gaming.tsx10
-rw-r--r--frontend/src/routes/golf/watch/apps/Waiting.tsx4
12 files changed, 30 insertions, 24 deletions
diff --git a/frontend/src/routes/golf/play/App.tsx b/frontend/src/routes/golf/play/App.tsx
index 0e650c9..b73830a 100644
--- a/frontend/src/routes/golf/play/App.tsx
+++ b/frontend/src/routes/golf/play/App.tsx
@@ -36,7 +36,7 @@ type WebSocketMessage =
};
};
-export default ({ gameId, playerId }: Props) => {
+export default function App({ gameId, playerId }: Props) {
// const socketUrl = `wss://t.nil.ninja/iosdc/2024/sock/golf/${gameId}/${playerId}/`;
const socketUrl = `ws://localhost:8002/sock/golf/${gameId}/${playerId}/`;
@@ -149,4 +149,4 @@ export default ({ gameId, playerId }: Props) => {
</div>
</div>
);
-};
+}
diff --git a/frontend/src/routes/golf/play/apps/Connecting.tsx b/frontend/src/routes/golf/play/apps/Connecting.tsx
index 9207089..ead4f03 100644
--- a/frontend/src/routes/golf/play/apps/Connecting.tsx
+++ b/frontend/src/routes/golf/play/apps/Connecting.tsx
@@ -3,6 +3,6 @@ type Props = {
playerId: number;
};
-export default (_props: Props) => {
+export default function Connecting(_props: Props) {
return <div>接続中です......</div>;
-};
+}
diff --git a/frontend/src/routes/golf/play/apps/Failed.tsx b/frontend/src/routes/golf/play/apps/Failed.tsx
index 6ea9b81..cc1748d 100644
--- a/frontend/src/routes/golf/play/apps/Failed.tsx
+++ b/frontend/src/routes/golf/play/apps/Failed.tsx
@@ -3,6 +3,6 @@ type Props = {
playerId: number;
};
-export default (_props: Props) => {
+export default function Failed(_props: Props) {
return <div>エラー</div>;
-};
+}
diff --git a/frontend/src/routes/golf/play/apps/Finished.tsx b/frontend/src/routes/golf/play/apps/Finished.tsx
index bad7526..e04c7a0 100644
--- a/frontend/src/routes/golf/play/apps/Finished.tsx
+++ b/frontend/src/routes/golf/play/apps/Finished.tsx
@@ -4,7 +4,7 @@ type Props = {
result: { yourScore: number | null; opponentScore: number | null };
};
-export default ({ result }: Props) => {
+export default function Finished({ result }: Props) {
const { yourScore, opponentScore } = result;
const yourScoreToCompare = yourScore ?? Infinity;
const opponentScoreToCompare = opponentScore ?? Infinity;
@@ -24,4 +24,4 @@ export default ({ result }: Props) => {
</div>
</>
);
-};
+}
diff --git a/frontend/src/routes/golf/play/apps/Gaming.tsx b/frontend/src/routes/golf/play/apps/Gaming.tsx
index ffabfa6..9be39c8 100644
--- a/frontend/src/routes/golf/play/apps/Gaming.tsx
+++ b/frontend/src/routes/golf/play/apps/Gaming.tsx
@@ -8,7 +8,7 @@ type Props = {
score: number | null;
};
-export default ({ problem, onCodeChange, score }: Props) => {
+export default function Gaming({ problem, onCodeChange, score }: Props) {
const handleTextChange = (e: React.ChangeEvent<HTMLTextAreaElement>) => {
onCodeChange({ code: e.target.value });
};
@@ -27,4 +27,4 @@ export default ({ problem, onCodeChange, score }: Props) => {
</div>
</div>
);
-};
+}
diff --git a/frontend/src/routes/golf/play/apps/Starting.tsx b/frontend/src/routes/golf/play/apps/Starting.tsx
index ae77853..b260b30 100644
--- a/frontend/src/routes/golf/play/apps/Starting.tsx
+++ b/frontend/src/routes/golf/play/apps/Starting.tsx
@@ -4,10 +4,10 @@ type Props = {
timeLeft: number | null;
};
-export default ({ timeLeft }: Props) => {
+export default function Starting({ timeLeft }: Props) {
return (
<>
<div>対戦相手が見つかりました。{timeLeft} 秒後にゲームを開始します。</div>
</>
);
-};
+}
diff --git a/frontend/src/routes/golf/play/apps/Waiting.tsx b/frontend/src/routes/golf/play/apps/Waiting.tsx
index 306978e..b7e6f31 100644
--- a/frontend/src/routes/golf/play/apps/Waiting.tsx
+++ b/frontend/src/routes/golf/play/apps/Waiting.tsx
@@ -3,6 +3,6 @@ type Props = {
playerId: number;
};
-export default (_props: Props) => {
+export default function Waiting(_props: Props) {
return <div>対戦相手が現れるのを待っています......</div>;
-};
+}
diff --git a/frontend/src/routes/golf/watch/App.tsx b/frontend/src/routes/golf/watch/App.tsx
index b24833f..ac2db23 100644
--- a/frontend/src/routes/golf/watch/App.tsx
+++ b/frontend/src/routes/golf/watch/App.tsx
@@ -32,7 +32,7 @@ type WebSocketMessage =
};
};
-export default ({ gameId }: Props) => {
+export default function App({ gameId }: Props) {
// const socketUrl = `wss://t.nil.ninja/iosdc/2024/sock/golf/${gameId}/watch/`;
const socketUrl = `ws://localhost:8002/sock/golf/${gameId}/watch/`;
@@ -108,4 +108,4 @@ export default ({ gameId }: Props) => {
</div>
</div>
);
-};
+}
diff --git a/frontend/src/routes/golf/watch/apps/Connecting.tsx b/frontend/src/routes/golf/watch/apps/Connecting.tsx
index 8dc7a8c..73d28eb 100644
--- a/frontend/src/routes/golf/watch/apps/Connecting.tsx
+++ b/frontend/src/routes/golf/watch/apps/Connecting.tsx
@@ -2,6 +2,6 @@ type Props = {
gameId: number;
};
-export default (_props: Props) => {
+export default function Connecting(_props: Props) {
return <div>接続中です......</div>;
-};
+}
diff --git a/frontend/src/routes/golf/watch/apps/Failed.tsx b/frontend/src/routes/golf/watch/apps/Failed.tsx
index 3c29d74..2727663 100644
--- a/frontend/src/routes/golf/watch/apps/Failed.tsx
+++ b/frontend/src/routes/golf/watch/apps/Failed.tsx
@@ -2,6 +2,6 @@ type Props = {
gameId: number;
};
-export default (_props: Props) => {
+export default function Failed(_props: Props) {
return <div>エラー</div>;
-};
+}
diff --git a/frontend/src/routes/golf/watch/apps/Gaming.tsx b/frontend/src/routes/golf/watch/apps/Gaming.tsx
index 623cb08..3f9c195 100644
--- a/frontend/src/routes/golf/watch/apps/Gaming.tsx
+++ b/frontend/src/routes/golf/watch/apps/Gaming.tsx
@@ -7,7 +7,13 @@ type Props = {
codeB: string | null;
};
-export default ({ problem, scoreA, codeA, scoreB, codeB }: Props) => {
+export default function Gaming({
+ problem,
+ scoreA,
+ codeA,
+ scoreB,
+ codeB,
+}: Props) {
return (
<>
<div style={{ display: "flex", flexDirection: "column" }}>
@@ -35,4 +41,4 @@ export default ({ problem, scoreA, codeA, scoreB, codeB }: Props) => {
</div>
</>
);
-};
+}
diff --git a/frontend/src/routes/golf/watch/apps/Waiting.tsx b/frontend/src/routes/golf/watch/apps/Waiting.tsx
index e8d5390..a82ee69 100644
--- a/frontend/src/routes/golf/watch/apps/Waiting.tsx
+++ b/frontend/src/routes/golf/watch/apps/Waiting.tsx
@@ -2,6 +2,6 @@ type Props = {
gameId: number;
};
-export default (_props: Props) => {
+export default function Waiting(_props: Props) {
return <div>対戦相手が現れるのを待っています......</div>;
-};
+}