From 4e2ca122c2ddefac31b0c0a2cdc7ad22b457fba0 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 1 Dec 2024 00:15:10 +0100 Subject: [PATCH] WHAT --- holycow_frontend/src/app/[telegramId]/profile/page.tsx | 3 ++- holycow_frontend/src/app/[telegramId]/report/page.tsx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/holycow_frontend/src/app/[telegramId]/profile/page.tsx b/holycow_frontend/src/app/[telegramId]/profile/page.tsx index 8a74d6e..eca935d 100644 --- a/holycow_frontend/src/app/[telegramId]/profile/page.tsx +++ b/holycow_frontend/src/app/[telegramId]/profile/page.tsx @@ -2,7 +2,8 @@ import {ProfileBox} from "@/components/ProfileBox" import {PlayerOO} from "@/holycow" -export default async function Page({params: {telegramId}}) { +export default async function Page({params}) { + const {telegramId} = await params const playerResponse = await fetch(`${process.env.BASE_URL}/api/results/telegram/${telegramId}`) const player: PlayerOO = await playerResponse.json() diff --git a/holycow_frontend/src/app/[telegramId]/report/page.tsx b/holycow_frontend/src/app/[telegramId]/report/page.tsx index 6315b61..28c1006 100644 --- a/holycow_frontend/src/app/[telegramId]/report/page.tsx +++ b/holycow_frontend/src/app/[telegramId]/report/page.tsx @@ -2,7 +2,8 @@ import {ReportBoxInteractive} from "@/components/ReportBoxInteractive" import {PlayerO} from "@/holycow" -export default async function Page({params: {telegramId}}) { +export default async function Page({params}) { + const {telegramId} = await params const playersResponse = await fetch(`${process.env.BASE_URL}/api/results/`) const players: PlayerO[] = await playersResponse.json() const playerA: PlayerO = players.find(p => p.telegram_id == telegramId)