-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
1,303 additions
and
1,055 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,14 @@ | ||
import { EnvVarWarning } from '@/components/env-var-warning'; | ||
import HeaderAuth from '@/components/header-auth'; | ||
import { hasEnvVars } from '@/utils/supabase/check-env-vars'; | ||
import { GeistSans } from 'geist/font/sans'; | ||
import { ThemeProvider } from 'next-themes'; | ||
import Link from 'next/link'; | ||
import './globals.css'; | ||
import { SidebarProvider, SidebarTrigger } from '@/components/ui/sidebar'; | ||
import { AppSidebar } from '@/components/app-sidebar'; | ||
|
||
const defaultUrl = process.env.VERCEL_URL | ||
? `https://${process.env.VERCEL_URL}` | ||
: 'http://localhost:3000'; | ||
|
||
export const metadata = { | ||
metadataBase: new URL(defaultUrl), | ||
title: 'Next.js and Supabase Starter Kit', | ||
description: 'The fastest way to build apps with Next.js and Supabase' | ||
}; | ||
|
||
export default function RootLayout({ | ||
children | ||
}: { | ||
children: React.ReactNode; | ||
}) { | ||
export default function Layout({ children }: { children: React.ReactNode }) { | ||
return ( | ||
<html lang='en' className={GeistSans.className} suppressHydrationWarning> | ||
<body className='bg-background text-foreground'> | ||
<ThemeProvider | ||
attribute='class' | ||
defaultTheme='system' | ||
enableSystem | ||
disableTransitionOnChange | ||
> | ||
<main className='min-h-screen flex flex-col items-center'> | ||
<div className='flex-1 w-full flex flex-col gap-20 items-center'> | ||
<nav className='w-full flex justify-center border-b border-b-foreground/10 h-16'> | ||
<div className='w-full max-w-5xl flex justify-between items-center p-3 px-5 text-sm'> | ||
<div className='flex gap-5 items-center font-semibold'> | ||
<Link href={'/'}>LOGO HERE</Link> | ||
<div className='flex items-center gap-2'></div> | ||
</div> | ||
{!hasEnvVars ? <EnvVarWarning /> : <HeaderAuth />} | ||
</div> | ||
</nav> | ||
<div className='flex flex-col gap-20 max-w-5xl p-5'> | ||
{children} | ||
</div> | ||
|
||
<footer className='w-full flex items-center justify-center border-t mx-auto text-center text-xs gap-8 py-16'> | ||
<p> | ||
Powered by{' '} | ||
<a | ||
href='https://supabase.com/?utm_source=create-next-app&utm_medium=template&utm_term=nextjs' | ||
target='_blank' | ||
className='font-bold hover:underline' | ||
rel='noreferrer' | ||
> | ||
Supabase | ||
</a> | ||
</p> | ||
</footer> | ||
</div> | ||
</main> | ||
</ThemeProvider> | ||
</body> | ||
</html> | ||
<SidebarProvider> | ||
<AppSidebar /> | ||
<main> | ||
<SidebarTrigger /> | ||
{children} | ||
</main> | ||
</SidebarProvider> | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import { Calendar, Home, Inbox, Search, Settings } from 'lucide-react'; | ||
import { | ||
Sidebar, | ||
SidebarContent, | ||
SidebarGroup, | ||
SidebarGroupContent, | ||
SidebarGroupLabel, | ||
SidebarMenu, | ||
SidebarMenuButton, | ||
SidebarMenuItem | ||
} from '@/components/ui/sidebar'; | ||
|
||
// Menu items. | ||
const items = [ | ||
{ | ||
title: 'Home', | ||
url: '#', | ||
icon: Home | ||
}, | ||
{ | ||
title: 'Inbox', | ||
url: '#', | ||
icon: Inbox | ||
}, | ||
{ | ||
title: 'Calendar', | ||
url: '#', | ||
icon: Calendar | ||
}, | ||
{ | ||
title: 'Search', | ||
url: '#', | ||
icon: Search | ||
}, | ||
{ | ||
title: 'Settings', | ||
url: '#', | ||
icon: Settings | ||
} | ||
]; | ||
|
||
export function AppSidebar() { | ||
return ( | ||
<Sidebar> | ||
<SidebarContent> | ||
<SidebarGroup> | ||
<SidebarGroupLabel>Application</SidebarGroupLabel> | ||
<SidebarGroupContent> | ||
<SidebarMenu> | ||
{items.map((item) => ( | ||
<SidebarMenuItem key={item.title}> | ||
<SidebarMenuButton asChild> | ||
<a href={item.url}> | ||
<item.icon /> | ||
<span>{item.title}</span> | ||
</a> | ||
</SidebarMenuButton> | ||
</SidebarMenuItem> | ||
))} | ||
</SidebarMenu> | ||
</SidebarGroupContent> | ||
</SidebarGroup> | ||
</SidebarContent> | ||
</Sidebar> | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.