mirror of
https://github.com/shadcn-ui/taxonomy
synced 2026-05-24 09:48:32 +00:00
Merge branch 'main' into feat/og
This commit is contained in:
commit
4a9b412fd9
2 changed files with 9 additions and 23 deletions
|
|
@ -1,10 +1,8 @@
|
|||
import Link from "next/link"
|
||||
|
||||
import { marketingConfig } from "@/config/marketing"
|
||||
import { getCurrentUser } from "@/lib/session"
|
||||
import { MainNav } from "@/components/main-nav"
|
||||
import { SiteFooter } from "@/components/site-footer"
|
||||
import { UserAccountNav } from "@/components/dashboard/user-account-nav"
|
||||
|
||||
interface MarketingLayoutProps {
|
||||
children: React.ReactNode
|
||||
|
|
@ -13,31 +11,19 @@ interface MarketingLayoutProps {
|
|||
export default async function MarketingLayout({
|
||||
children,
|
||||
}: MarketingLayoutProps) {
|
||||
const user = await getCurrentUser()
|
||||
|
||||
return (
|
||||
<div className="flex min-h-screen flex-col">
|
||||
<header className="container sticky top-0 z-40 bg-white">
|
||||
<div className="flex h-16 items-center justify-between border-b border-b-slate-200 py-4">
|
||||
<MainNav items={marketingConfig.mainNav} />
|
||||
{user ? (
|
||||
<UserAccountNav
|
||||
user={{
|
||||
name: user.name,
|
||||
image: user.image,
|
||||
email: user.email,
|
||||
}}
|
||||
/>
|
||||
) : (
|
||||
<nav>
|
||||
<Link
|
||||
href="/login"
|
||||
className="relative inline-flex h-8 items-center rounded-md border border-transparent bg-brand-500 px-6 py-1 text-sm font-medium text-white hover:bg-brand-400 focus:outline-none focus:ring-2 focus:ring-brand-500 focus:ring-offset-2"
|
||||
>
|
||||
Login
|
||||
</Link>
|
||||
</nav>
|
||||
)}
|
||||
<nav>
|
||||
<Link
|
||||
href="/login"
|
||||
className="relative inline-flex h-8 items-center rounded-md border border-transparent bg-brand-500 px-6 py-1 text-sm font-medium text-white hover:bg-brand-400 focus:outline-none focus:ring-2 focus:ring-brand-500 focus:ring-offset-2"
|
||||
>
|
||||
Login
|
||||
</Link>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
<main className="flex-1">{children}</main>
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ export default async function IndexPage() {
|
|||
>
|
||||
GitHub
|
||||
</Link>
|
||||
.
|
||||
.{" "}
|
||||
<Link href="/docs" className="underline underline-offset-4">
|
||||
I'm also documenting everything here
|
||||
</Link>
|
||||
|
|
|
|||
Loading…
Reference in a new issue