1
Fork 0
This commit is contained in:
Steffo 2024-12-01 00:15:10 +01:00
parent 57859b514f
commit 4e2ca122c2
Signed by: steffo
GPG key ID: 5ADA3868646C3FC0
2 changed files with 4 additions and 2 deletions

View file

@ -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()

View file

@ -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)