draupnir4all-web

git clone git://archive.git.mtrnord.blog/MTRNord/draupnir4all-web.git
Log | Files | Refs | README | LICENSE

page.tsx (420B)


      1 import { redirect } from "next/navigation"
      2 
      3 export default async function DashboardPage({
      4   searchParams,
      5 }: {
      6   searchParams: Promise<{ [key: string]: string | string[] | undefined }>
      7 }) {
      8   const teamId = (await searchParams).team as string | undefined
      9 
     10   // Redirect to overview with team parameter
     11   const redirectUrl = teamId ? `/dashboard/overview?team=${teamId}` : "/dashboard/overview"
     12 
     13   redirect(redirectUrl)
     14 }