import type { Route } from "./+types/tasks"; import { AppShell, PageHeader } from "../components/shell"; import { TaskList } from "@refs/design-system"; import { signedIn, nowSeconds } from "../lib/session"; export const meta: Route.MetaFunction = () => [{ title: "Tasks ยท refs" }]; export async function loader({ request, context }: Route.LoaderArgs) { const params = new URL(request.url).searchParams; const status = params.get("state") === "closed" ? ("closed" as const) : ("open" as const); const label = params.get("label") || null; const list = await signedIn(context).tasks({ status, label: label ?? undefined }); return { status, label, now: nowSeconds(), ...list }; } export default function Tasks({ loaderData }: Route.ComponentProps) { return ( ); }