29 lines
877 B
TypeScript
29 lines
877 B
TypeScript
import { createFileRoute, redirect } from '@tanstack/react-router';
|
|
import { CheckinCard } from '@/components/workbenchCards/checkin';
|
|
import { hasToken } from '@/lib/token';
|
|
|
|
export const Route = createFileRoute('/_sidebarLayout/')({
|
|
component: Index,
|
|
loader: async () => {
|
|
if (!hasToken()) {
|
|
throw redirect({
|
|
to: '/login',
|
|
});
|
|
}
|
|
},
|
|
});
|
|
|
|
function Index() {
|
|
return (
|
|
<div className="flex flex-col gap-4 py-4 md:gap-6 md:py-6">
|
|
{/* Section Cards */}
|
|
<div className="*:data-[slot=card]:from-primary/5 *:data-[slot=card]:to-card dark:*:data-[slot=card]:bg-card
|
|
grid grid-cols-1 gap-4 px-4 auto-rows-[minmax(175px,auto)] items-stretch
|
|
*:data-[slot=card]:bg-linear-to-t *:data-[slot=card]:shadow-xs lg:px-6 @xl/main:grid-cols-2 @5xl/main:grid-cols-4"
|
|
>
|
|
<CheckinCard />
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|