mirror of
https://github.com/ershisan99/www.git
synced 2026-01-29 12:35:47 +00:00
add social links support
This commit is contained in:
18
src/app/(home)/profile/settings/page.tsx
Normal file
18
src/app/(home)/profile/settings/page.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
import { ProfileSettingsPageClient } from '@/app/(home)/profile/settings/page-client'
|
||||
import { auth } from '@/server/auth'
|
||||
import { HydrateClient, api } from '@/trpc/server'
|
||||
import { SessionProvider } from 'next-auth/react'
|
||||
import { redirect } from 'next/navigation'
|
||||
|
||||
export default async function ProfileSettingsPage() {
|
||||
const session = await auth()
|
||||
if (!session) {
|
||||
redirect('/')
|
||||
}
|
||||
await Promise.all([api.profile.getSocialLinks.prefetch()])
|
||||
return (
|
||||
<HydrateClient>
|
||||
<ProfileSettingsPageClient userId={session.user.discord_id} />
|
||||
</HydrateClient>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user