-
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.
no breaking change, error BREAKING CHANGE: new feature
- Loading branch information
1 parent
120b92e
commit b3fc933
Showing
7 changed files
with
111 additions
and
28 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
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,13 +1,21 @@ | ||
import { | ||
BellIcon, | ||
CircleHelpIcon, | ||
DiamondIcon, | ||
FolderIcon, | ||
HomeIcon, | ||
ListChecksIcon, | ||
MessageSquareMore, | ||
PanelLeftCloseIcon, | ||
PenLineIcon, | ||
PuzzleIcon, | ||
} from 'lucide-react'; | ||
import Image from 'next/image'; | ||
import type { PropsWithChildren } from 'react'; | ||
import { ActiveButton } from './_components/active-button'; | ||
import { CreatePlusDropdownMenu } from './_components/create-plus-dropdown-menu'; | ||
import { Button } from '@/primitives/button'; | ||
import { UserButton } from '@clerk/nextjs'; | ||
|
||
const iconSize = 15; | ||
|
||
|
@@ -41,22 +49,83 @@ const sideMenuStaticLinks = [ | |
|
||
export default function AppLayout({ children }: PropsWithChildren) { | ||
return ( | ||
<main className="flex min-h-dvh gap-8 p-4"> | ||
<aside className="w-[220px]"> | ||
<div className="flex items-center gap-3 pl-3 pt-4"> | ||
<Image src="/logo.png" width={35} height={35} alt="Noodle Logo" /> | ||
<span>Noodle</span> | ||
<main className="flex min-h-dvh gap-4 p-4"> | ||
<aside className="flex w-[200px] flex-col justify-between"> | ||
<div> | ||
<div className="flex items-center gap-3 pl-3 pt-4"> | ||
<Image src="/logo.png" width={35} height={35} alt="Enoflow Logo" /> | ||
<span>Enoflow</span> | ||
</div> | ||
|
||
<ul className="mt-8 flex flex-col"> | ||
{sideMenuStaticLinks.map(({ icon, label, href }) => ( | ||
<li key={label} className="flex flex-1 flex-col"> | ||
<ActiveButton icon={icon} label={label} href={href} /> | ||
</li> | ||
))} | ||
</ul> | ||
|
||
<div className="mt-6 space-y-2"> | ||
<h3 className="pl-4 text-xs text-gray">Modules</h3> | ||
<ul className="flex flex-col"> | ||
<li className="flex flex-1 flex-col"> | ||
<ActiveButton | ||
href="/modules/ai" | ||
icon={<FolderIcon size={15} strokeWidth={1.5} />} | ||
label="Artificial Intelligence" | ||
/> | ||
</li> | ||
<li className="flex flex-1 flex-col"> | ||
<ActiveButton | ||
href="/modules/databases" | ||
icon={<FolderIcon size={15} strokeWidth={1.5} />} | ||
label="Databases" | ||
/> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
|
||
<ul className="mt-8"> | ||
{sideMenuStaticLinks.map(({ icon, label, href }) => ( | ||
<li key={label}> | ||
<ActiveButton icon={icon} label={label} href={href} /> | ||
</li> | ||
))} | ||
</ul> | ||
<div className="mb-6 flex flex-col"> | ||
<Button | ||
variant="ghost" | ||
className="justify-start gap-3 font-normal" | ||
asChild | ||
> | ||
<a href="mailto:[email protected]"> | ||
<MessageSquareMore size={15} strokeWidth={1.5} /> Feedback | ||
</a> | ||
</Button> | ||
<Button | ||
variant="ghost" | ||
className="justify-start gap-3 font-normal" | ||
asChild | ||
> | ||
<a href="mailto:[email protected]"> | ||
<CircleHelpIcon size={15} strokeWidth={1.5} /> Help & Support | ||
</a> | ||
</Button> | ||
</div> | ||
</aside> | ||
<div className="flex-1 rounded-lg border p-6">{children}</div> | ||
|
||
<div className="flex flex-1 flex-col rounded-xl border px-6 pb-6 pt-4"> | ||
<nav className="mb-6 flex items-center justify-between"> | ||
<div> | ||
<Button variant="ghost" size="icon" className="-ml-2"> | ||
<PanelLeftCloseIcon strokeWidth={1.5} size={18} /> | ||
</Button> | ||
</div> | ||
<div className="flex items-center gap-4"> | ||
<CreatePlusDropdownMenu /> | ||
<Button variant="ghost" size="icon"> | ||
<BellIcon size={18} /> | ||
</Button> | ||
<UserButton /> | ||
</div> | ||
</nav> | ||
|
||
{children} | ||
</div> | ||
</main> | ||
); | ||
} |
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,14 +1,18 @@ | ||
import { SignOutButton } from '@clerk/nextjs'; | ||
|
||
/** | ||
* This is the main page for the dashboard. | ||
* @returns A Next.js RSC page component. | ||
*/ | ||
export default function DashboardHome() { | ||
return ( | ||
<main> | ||
<h1>Hello world, this is the dashboard.</h1> | ||
<SignOutButton /> | ||
</main> | ||
<div className="flex flex-1"> | ||
<div className="flex-1"> | ||
<div className="space-y-3"> | ||
<h1 className="text-4xl font-semibold">Good afternoon, Caleb!</h1> | ||
<p className="max-w-prose text-balance text-sm leading-6 text-foreground-muted"> | ||
“The final wisdom of life requires not the annulment of incongruity | ||
but the achievement of serenity within and above it.” - Reinhold | ||
Niebuhr | ||
</p> | ||
</div> | ||
<div>More content</div> | ||
</div> | ||
<div className="min-w-[280px] rounded-lg border p-4">Right side</div> | ||
</div> | ||
); | ||
} |
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
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