30 lines
1.3 KiB
TypeScript
30 lines
1.3 KiB
TypeScript
export const dynamic = 'force-dynamic'
|
|
|
|
import Link from 'next/link'
|
|
import { redirect } from 'next/navigation'
|
|
import { getSession } from '@/lib/auth/get-session'
|
|
|
|
export default async function HsePage() {
|
|
const session = await getSession()
|
|
if (!session) redirect('/login')
|
|
|
|
return (
|
|
<main className="max-w-4xl mx-auto px-4 py-6">
|
|
<h1 className="text-2xl font-bold text-gray-900 mb-1">HSE Officer Portal</h1>
|
|
<p className="text-gray-500 text-sm mb-8">Welcome, {session.name}</p>
|
|
<div className="grid grid-cols-2 gap-4 sm:grid-cols-3">
|
|
<Link href="/hse/incidents" className="bg-surface shadow-sm p-5 hover:shadow-md transition-shadow border border-divider">
|
|
<div className="text-2xl mb-2">📋</div>
|
|
<div className="font-semibold text-gray-900">Incident Inbox</div>
|
|
<div className="text-xs text-gray-500 mt-1">View all incidents</div>
|
|
</Link>
|
|
<Link href="/hse/dashboard" className="bg-surface shadow-sm p-5 hover:shadow-md transition-shadow border border-divider">
|
|
<div className="text-2xl mb-2">📊</div>
|
|
<div className="font-semibold text-gray-900">Dashboard</div>
|
|
<div className="text-xs text-gray-500 mt-1">Stats & overview</div>
|
|
</Link>
|
|
</div>
|
|
</main>
|
|
)
|
|
}
|