- Add 'force-dynamic' export to API routes using cookies/searchParams - Add 'force-dynamic' export to page components using dynamic features - Create proper error pages without i18n complexity - Fix "Dynamic server usage" errors during static generation Routes now properly marked as dynamic will render at request time instead of failing during build-time static generation. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
26 lines
No EOL
743 B
TypeScript
26 lines
No EOL
743 B
TypeScript
import { Metadata } from 'next'
|
|
import Link from 'next/link'
|
|
|
|
// Force dynamic rendering to avoid useContext issues during static generation
|
|
export const dynamic = 'force-dynamic'
|
|
|
|
export const metadata: Metadata = {
|
|
title: 'Unauthorized / granblue.team',
|
|
description: "You don't have permission to perform that action"
|
|
}
|
|
|
|
export default function UnauthorizedPage() {
|
|
return (
|
|
<div className="error-container">
|
|
<div className="error-content">
|
|
<h1>Unauthorized</h1>
|
|
<p>You don't have permission to perform that action</p>
|
|
<div className="error-actions">
|
|
<Link href="/teams" className="button primary">
|
|
Browse teams
|
|
</Link>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
)
|
|
} |