File size: 462 Bytes
05c5ed5
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import WorkflowListPage from "@/components/workflow/workflow-list-page";
import { getSession } from "auth/server";
import { redirect } from "next/navigation";

// Force dynamic rendering to avoid static generation issues with session
export const dynamic = "force-dynamic";

export default async function Page() {
  const session = await getSession();
  if (!session) {
    redirect("/sign-in");
  }
  return <WorkflowListPage userRole={session.user.role} />;
}