WHAT
This commit is contained in:
parent
57859b514f
commit
4e2ca122c2
2 changed files with 4 additions and 2 deletions
|
@ -2,7 +2,8 @@ import {ProfileBox} from "@/components/ProfileBox"
|
||||||
import {PlayerOO} from "@/holycow"
|
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 playerResponse = await fetch(`${process.env.BASE_URL}/api/results/telegram/${telegramId}`)
|
||||||
const player: PlayerOO = await playerResponse.json()
|
const player: PlayerOO = await playerResponse.json()
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,8 @@ import {ReportBoxInteractive} from "@/components/ReportBoxInteractive"
|
||||||
import {PlayerO} from "@/holycow"
|
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 playersResponse = await fetch(`${process.env.BASE_URL}/api/results/`)
|
||||||
const players: PlayerO[] = await playersResponse.json()
|
const players: PlayerO[] = await playersResponse.json()
|
||||||
const playerA: PlayerO = players.find(p => p.telegram_id == telegramId)
|
const playerA: PlayerO = players.find(p => p.telegram_id == telegramId)
|
||||||
|
|
Loading…
Reference in a new issue