import { createFileRoute, redirect } from '@tanstack/react-router';

export const Route = createFileRoute('/(app)/(auth)/kanri')({
  beforeLoad: ({ context }) => {
    if (!context.session?.user.role && context.session?.user.role !== 'admin') {
      throw redirect({ to: '/' });
    }
  },
  staticData: { breadcrumb: 'Kanri' },
});
