mirror of
https://github.com/ershisan99/www.git
synced 2026-02-03 21:02:09 +00:00
wip
This commit is contained in:
29
src/app/players/[id]/page.tsx
Normal file
29
src/app/players/[id]/page.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import { PlayerGames } from '@/app/players/[id]/games'
|
||||
import { UserInfo } from '@/app/players/[id]/user'
|
||||
import { auth } from '@/server/auth'
|
||||
import { HydrateClient, api } from '@/trpc/server'
|
||||
import { Suspense } from 'react'
|
||||
|
||||
export default async function PlayerPage({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ id: string }>
|
||||
}) {
|
||||
const session = await auth()
|
||||
const { id } = await params
|
||||
if (id) {
|
||||
await api.history.user_games.prefetch({
|
||||
user_id: id,
|
||||
})
|
||||
await api.discord.get_user_by_id.prefetch({
|
||||
user_id: id,
|
||||
})
|
||||
}
|
||||
return (
|
||||
<Suspense>
|
||||
<HydrateClient>
|
||||
<UserInfo />
|
||||
</HydrateClient>
|
||||
</Suspense>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user