diff --git a/app/admin/dashboard/page.tsx b/app/admin/dashboard/page.tsx new file mode 100644 index 0000000..78c41ab --- /dev/null +++ b/app/admin/dashboard/page.tsx @@ -0,0 +1,13 @@ +import { verifySession } from "@/lib/supabase/dal" +import { redirect } from "next/navigation"; + +const AdminDashboard = async () => { + const { isAdmin } = await verifySession(); + if (!isAdmin) redirect("/client/dashboard"); + + return ( +
AdminDashboard
+ ) +} + +export default AdminDashboard \ No newline at end of file diff --git a/app/client/dashboard/page.tsx b/app/client/dashboard/page.tsx new file mode 100644 index 0000000..ec7110a --- /dev/null +++ b/app/client/dashboard/page.tsx @@ -0,0 +1,8 @@ + +const ClientDashboard = () => { + return ( +
page
+ ) +} + +export default ClientDashboard \ No newline at end of file diff --git a/app/globals.css b/app/globals.css index 02d9249..f278a06 100644 --- a/app/globals.css +++ b/app/globals.css @@ -115,7 +115,7 @@ } :root { - --background: var(--ink-0); + --background: oklch(0.99 0 0); --foreground: var(--ink-950); --card: var(--ink-0); --card-foreground: var(--ink-950); diff --git a/app/page.tsx b/app/page.tsx index 527ab30..5dc0188 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,8 +1,5 @@ +import LoginPageView from "@/modules/loginPage/ui/views/login-view"; export default function Home() { - return ( -
- -
- ); + return ; } diff --git a/components/ui/field.tsx b/components/ui/field.tsx new file mode 100644 index 0000000..8ae7f29 --- /dev/null +++ b/components/ui/field.tsx @@ -0,0 +1,238 @@ +"use client" + +import { useMemo } from "react" +import { cva, type VariantProps } from "class-variance-authority" +import { cn } from "cn" + +import { Label } from "@/components/ui/label" +import { Separator } from "@/components/ui/separator" + +function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">) { + return ( +
[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3", + className + )} + {...props} + /> + ) +} + +function FieldLegend({ + className, + variant = "legend", + ...props +}: React.ComponentProps<"legend"> & { variant?: "legend" | "label" }) { + return ( + + ) +} + +function FieldGroup({ className, ...props }: React.ComponentProps<"div">) { + return ( +
+ ) +} + +const fieldVariants = cva( + "group/field flex w-full gap-2 data-[invalid=true]:text-destructive", + { + variants: { + orientation: { + vertical: "flex-col *:w-full [&>.sr-only]:w-auto", + horizontal: + "flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px", + responsive: + "flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px", + }, + }, + defaultVariants: { + orientation: "vertical", + }, + } +) + +function Field({ + className, + orientation = "vertical", + ...props +}: React.ComponentProps<"div"> & VariantProps) { + return ( +
+ ) +} + +function FieldContent({ className, ...props }: React.ComponentProps<"div">) { + return ( +
+ ) +} + +function FieldLabel({ + className, + ...props +}: React.ComponentProps) { + return ( +