From eab39a5d9aef900522ae4562f8f45fbf4f3d90ea Mon Sep 17 00:00:00 2001 From: iamhectorsosa Date: Tue, 2 Apr 2024 13:06:08 +0200 Subject: [PATCH] Adding application UI --- apps/next/app/layout.tsx | 16 +- apps/next/app/login/layout.tsx | 10 -- apps/next/app/page.tsx | 26 +-- apps/next/app/providers.tsx | 3 +- apps/next/app/settings/layout.tsx | 4 +- apps/next/components/application-layout.tsx | 170 ++++++++++++++++++ apps/next/components/dynamic-breadcrumbs.tsx | 56 ------ apps/next/components/ui/card.tsx | 76 ++++++++ apps/next/components/ui/sheet.tsx | 140 +++++++++++++++ apps/next/components/ui/tabs.tsx | 55 ++++++ apps/next/components/ui/tooltip.tsx | 30 ++++ apps/next/components/user/accounts.tsx | 131 ++++++++------ .../next/components/user/credentials-form.tsx | 153 ++++++++-------- apps/next/components/user/login-form.tsx | 149 ++++++++------- .../user/new-reset-password-form.tsx | 101 ++++++----- apps/next/components/user/otp-login-form.tsx | 137 +++++++------- .../next/components/user/profile-dropdown.tsx | 95 ++++++++++ apps/next/components/user/profile-form.tsx | 157 ++++++++-------- apps/next/components/user/register-form.tsx | 135 +++++++------- .../components/user/reset-password-form.tsx | 103 ++++++----- apps/next/package.json | 4 + 21 files changed, 1161 insertions(+), 590 deletions(-) delete mode 100644 apps/next/app/login/layout.tsx create mode 100644 apps/next/components/application-layout.tsx delete mode 100644 apps/next/components/dynamic-breadcrumbs.tsx create mode 100644 apps/next/components/ui/card.tsx create mode 100644 apps/next/components/ui/sheet.tsx create mode 100644 apps/next/components/ui/tabs.tsx create mode 100644 apps/next/components/ui/tooltip.tsx create mode 100644 apps/next/components/user/profile-dropdown.tsx diff --git a/apps/next/app/layout.tsx b/apps/next/app/layout.tsx index 0e1c980..989a338 100644 --- a/apps/next/app/layout.tsx +++ b/apps/next/app/layout.tsx @@ -7,6 +7,10 @@ import { Providers } from "./providers" import "./globals.css" +import { ApplicationLayout } from "@/components/application-layout" + +import { createClient } from "@/modules/utils/server" + const fontSans = FontSans({ subsets: ["latin"], variable: "--font-sans", @@ -18,11 +22,17 @@ export const metadata: Metadata = { description: "Supabase Modules - Build smarter with pre-built modules today", } -export default function RootLayout({ +export default async function RootLayout({ children, }: Readonly<{ children: React.ReactNode }>) { + const supabase = createClient() + + const { + data: { user }, + } = await supabase.auth.getUser() + return ( -