mirror of
https://github.com/ershisan99/www.git
synced 2026-01-29 21:02:08 +00:00
28 lines
680 B
TypeScript
28 lines
680 B
TypeScript
import { LeaderboardPage } from '@/app/_components/leaderboard'
|
|
import { auth } from '@/server/auth'
|
|
import { RANKED_CHANNEL, VANILLA_CHANNEL } from '@/shared/constants'
|
|
import { HydrateClient, api } from '@/trpc/server'
|
|
import { Suspense } from 'react'
|
|
|
|
export default async function Home() {
|
|
const session = await auth()
|
|
await Promise.all([
|
|
api.leaderboard.get_leaderboard.prefetch({
|
|
channel_id: RANKED_CHANNEL,
|
|
}),
|
|
api.leaderboard.get_leaderboard.prefetch({
|
|
channel_id: VANILLA_CHANNEL,
|
|
}),
|
|
])
|
|
if (session?.user) {
|
|
}
|
|
|
|
return (
|
|
<Suspense>
|
|
<HydrateClient>
|
|
<LeaderboardPage />
|
|
</HydrateClient>
|
|
</Suspense>
|
|
)
|
|
}
|