mirror of
https://github.com/ershisan99/www.git
synced 2026-01-28 12:35:47 +00:00
wip
This commit is contained in:
@@ -1,10 +1,20 @@
|
||||
import { LeaderboardPage } from '@/app/_components/leaderboard'
|
||||
import { UserStats } from '@/app/_components/user-stats'
|
||||
import { auth } from '@/server/auth'
|
||||
import { HydrateClient } from '@/trpc/server'
|
||||
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) {
|
||||
console.log('user', session.user)
|
||||
// void api.post.getLatest.prefetch()
|
||||
@@ -12,7 +22,10 @@ export default async function Home() {
|
||||
|
||||
return (
|
||||
<HydrateClient>
|
||||
<UserStats />
|
||||
<Suspense>
|
||||
<UserStats />
|
||||
<LeaderboardPage />
|
||||
</Suspense>
|
||||
</HydrateClient>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user