aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/app
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/app')
-rw-r--r--frontend/app/.server/api/client.ts4
-rw-r--r--frontend/app/components/GolfPlayApp.client.tsx5
-rw-r--r--frontend/app/components/GolfWatchApp.client.tsx5
-rw-r--r--frontend/app/routes/dashboard.tsx4
4 files changed, 8 insertions, 10 deletions
diff --git a/frontend/app/.server/api/client.ts b/frontend/app/.server/api/client.ts
index aae1723..1c96b7b 100644
--- a/frontend/app/.server/api/client.ts
+++ b/frontend/app/.server/api/client.ts
@@ -4,8 +4,8 @@ import type { paths } from "./schema";
const apiClient = createClient<paths>({
baseUrl:
process.env.NODE_ENV === "development"
- ? "http://localhost:8002/api/"
- : "http://api-server/api/",
+ ? "http://localhost:8002/iosdc-japan/2024/code-battle/api/"
+ : "http://api-server/iosdc-japan/2024/code-battle/api/",
});
export async function apiPostLogin(
diff --git a/frontend/app/components/GolfPlayApp.client.tsx b/frontend/app/components/GolfPlayApp.client.tsx
index 911fae0..43828e6 100644
--- a/frontend/app/components/GolfPlayApp.client.tsx
+++ b/frontend/app/components/GolfPlayApp.client.tsx
@@ -22,11 +22,10 @@ export default function GolfPlayApp({
game: Game;
sockToken: string;
}) {
- // const socketUrl = `wss://t.nil.ninja/iosdc-japan/2024/sock/golf/${game.game_id}/play?token=${sockToken}`;
const socketUrl =
process.env.NODE_ENV === "development"
- ? `ws://localhost:8002/sock/golf/${game.game_id}/play?token=${sockToken}`
- : `ws://api-server/sock/golf/${game.game_id}/play?token=${sockToken}`;
+ ? `ws://localhost:8002/iosdc-japan/2024/code-battle/sock/golf/${game.game_id}/play?token=${sockToken}`
+ : `wss://t.nil.ninja/iosdc-japan/2024/code-battle/sock/golf/${game.game_id}/play?token=${sockToken}`;
const { sendJsonMessage, lastJsonMessage, readyState } =
useWebSocket<WebSocketMessage>(socketUrl, {});
diff --git a/frontend/app/components/GolfWatchApp.client.tsx b/frontend/app/components/GolfWatchApp.client.tsx
index aefe945..829f709 100644
--- a/frontend/app/components/GolfWatchApp.client.tsx
+++ b/frontend/app/components/GolfWatchApp.client.tsx
@@ -20,11 +20,10 @@ export default function GolfWatchApp({
game: Game;
sockToken: string;
}) {
- // const socketUrl = `wss://t.nil.ninja/iosdc-japan/2024/sock/golf/${game.game_id}/watch?token=${sockToken}`;
const socketUrl =
process.env.NODE_ENV === "development"
- ? `ws://localhost:8002/sock/golf/${game.game_id}/watch?token=${sockToken}`
- : `ws://api-server/sock/golf/${game.game_id}/watch?token=${sockToken}`;
+ ? `ws://localhost:8002/iosdc-japan/2024/code-battle/sock/golf/${game.game_id}/watch?token=${sockToken}`
+ : `wss://t.nil.ninja/iosdc-japan/2024/code-battle/sock/golf/${game.game_id}/watch?token=${sockToken}`;
const { lastJsonMessage, readyState } = useWebSocket<WebSocketMessage>(
socketUrl,
diff --git a/frontend/app/routes/dashboard.tsx b/frontend/app/routes/dashboard.tsx
index e6a43de..d69018a 100644
--- a/frontend/app/routes/dashboard.tsx
+++ b/frontend/app/routes/dashboard.tsx
@@ -13,8 +13,8 @@ export async function loader({ request }: LoaderFunctionArgs) {
if (user.is_admin) {
return redirect(
process.env.NODE_ENV === "development"
- ? "http://localhost:8002/admin/dashboard"
- : "/admin/dashboard",
+ ? "http://localhost:8002/iosdc-japan/2024/code-battle/admin/dashboard"
+ : "/iosdc-japan/2024/code-battle/admin/dashboard",
);
}
const { games } = await apiGetGames(token);