Skip to content

Commit

Permalink
starting first page draft (Codehagen#203)
Browse files Browse the repository at this point in the history
  • Loading branch information
Codehagen authored Mar 7, 2024
1 parent 6e2873d commit c0a7fd6
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 45 deletions.
30 changes: 16 additions & 14 deletions apps/www/components/new-dashboard/components/dashboard-1.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,58 +123,60 @@ export function Dashboard({
variant: "ghost",
link: "/dashboard/accounts",
},
]}
/>
<Separator />
<Nav
isCollapsed={isCollapsed}
links={[
{
title: "Investments",
label: "",
label: "Next",
icon: BarChart,
variant: "ghost",
link: "/dashboard/investments",
},
{
title: "Categories",
label: "",
label: "Upcoming",
icon: Tag,
variant: "ghost",
link: "/dashboard/categories",
},
{
title: "Recurring",
label: "",
label: "Upcoming",

icon: Repeat2,
variant: "ghost",
link: "/dashboard/recurring",
},
]}
/>
<Separator />
<Nav
isCollapsed={isCollapsed}
links={[
{
title: "Ai Magic",
label: "",
label: "Upcoming",

icon: Sparkle,
variant: "ghost",
link: "/dashboard/aimagic",
},
{
title: "Save Money",
label: "",
label: "Future",
icon: Wallet,
variant: "ghost",
link: "/dashboard/savemoney",
},
{
title: "Grow Assets",
label: "",
label: "Future",
icon: Sprout,
variant: "ghost",
link: "/dashboard/",
},
]}
/>
<Separator />
<Nav
{/* <Nav
isCollapsed={isCollapsed}
links={[
{
Expand Down Expand Up @@ -233,7 +235,7 @@ export function Dashboard({
link: "/dashboard/",
},
]}
/>
/> */}
<Separator />
<Nav
isCollapsed={isCollapsed}
Expand Down
45 changes: 23 additions & 22 deletions apps/www/components/new-dashboard/components/nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Link from "next/link";
import { LucideIcon } from "lucide-react";

import { cn } from "@/lib/utils";
import { Badge } from "@/components/ui/badge";
import { buttonVariants } from "@/components/ui/button";
import {
Tooltip,
Expand Down Expand Up @@ -34,12 +35,10 @@ export function Nav({ links, isCollapsed }: NavProps) {
<Tooltip key={index} delayDuration={0}>
<TooltipTrigger asChild>
<Link
href={link.link} // Updated to use the link property
href={link.link}
className={cn(
buttonVariants({ variant: link.variant, size: "icon" }),
"h-9 w-9",
link.variant === "default" &&
"dark:bg-muted dark:text-muted-foreground dark:hover:bg-muted dark:hover:text-white",
)}
>
<link.icon className="h-4 w-4" />
Expand All @@ -48,37 +47,39 @@ export function Nav({ links, isCollapsed }: NavProps) {
</TooltipTrigger>
<TooltipContent side="right" className="flex items-center gap-4">
{link.title}
{link.label && (
<span className="ml-auto text-muted-foreground">
{link.label}
</span>
)}
<span className="ml-auto text-muted-foreground">
{link.label ? link.label : <Badge>Coming soon</Badge>}
</span>
</TooltipContent>
</Tooltip>
) : (
<Link
key={index}
href={link.link} // Updated to use the link property
href={link.link}
className={cn(
buttonVariants({ variant: link.variant, size: "sm" }),
link.variant === "default" &&
"dark:bg-muted dark:text-white dark:hover:bg-muted dark:hover:text-white",
"justify-start",
)}
>
<link.icon className="mr-2 h-4 w-4" />
{link.title}
{link.label && (
<span
className={cn(
"ml-auto",
link.variant === "default" &&
"text-background dark:text-white",
)}
>
{link.label}
</span>
)}
<span
className={cn(
"ml-auto",
link.variant === "default" && "text-background",
)}
>
{link.label === "" ? null : [
"Upcoming",
"Next",
"Future",
"Soon",
].includes(link.label || "") ? (
<Badge>{link.label}</Badge>
) : (
link.label
)}
</span>
</Link>
),
)}
Expand Down
9 changes: 4 additions & 5 deletions apps/www/config/dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ import { DashboardConfig } from "@/types";

export const dashboardConfig: DashboardConfig = {
mainNav: [
// {
// title: "Documentation",
// href: "/docs",
// disabled: true,
// },
{
title: "Documentation",
href: "/docs",
},
{
title: "Support",
href: "/support",
Expand Down
8 changes: 4 additions & 4 deletions apps/www/config/property.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ export const propertyConfig: PropertyConfig = {
title: "Dashboard",
href: "/dashboard",
},
// {
// title: "Documentation",
// href: "/docs",
// },
{
title: "Documentation",
href: "/docs",
},
{
title: "Support",
href: "/support",
Expand Down

0 comments on commit c0a7fd6

Please sign in to comment.