- Add dynamic OG image generation endpoint (/og) adapted from monorepo - Replace favicon with monorepo version, remove unused icon.svg - Add seo.ts config, robots.ts, sitemap.ts for better search indexing - Add per-page metadata (editor, viewer, settings, profile, community) - Remove stale package-lock.json that caused ENOWORKSPACES errors with Next.js - Add OG fonts (Geist Regular, Plus Jakarta Sans SemiBold) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
39 lines
1.0 KiB
TypeScript
39 lines
1.0 KiB
TypeScript
export const dynamic = 'force-dynamic'
|
|
|
|
import type { Metadata } from 'next'
|
|
import { redirect } from 'next/navigation'
|
|
import { getSession } from '@/features/community/lib/auth/server'
|
|
import { getUserProfile, getConnectedAccounts } from '@/features/community/lib/auth/actions'
|
|
import { SettingsPage } from '@/features/community/components/settings-page'
|
|
|
|
export const metadata: Metadata = {
|
|
title: 'Account Settings',
|
|
description: 'Manage your Pascal Editor account profile and connected providers.',
|
|
robots: {
|
|
index: false,
|
|
follow: false,
|
|
},
|
|
}
|
|
|
|
export default async function Settings() {
|
|
const session = await getSession()
|
|
if (!session?.user) {
|
|
redirect('/')
|
|
}
|
|
|
|
const [profile, connectedAccounts] = await Promise.all([
|
|
getUserProfile(),
|
|
getConnectedAccounts(),
|
|
])
|
|
|
|
return (
|
|
<SettingsPage
|
|
user={session.user}
|
|
currentUsername={profile?.username ?? null}
|
|
currentGithubUrl={profile?.githubUrl ?? null}
|
|
currentXUrl={profile?.xUrl ?? null}
|
|
connectedAccounts={connectedAccounts}
|
|
/>
|
|
)
|
|
}
|