Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
614 changes: 614 additions & 0 deletions app/(dashboard)/dashboard/data.json

Large diffs are not rendered by default.

53 changes: 53 additions & 0 deletions app/(dashboard)/dashboard/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
"use client";
import { ChartAreaInteractive } from "@/components/chart-area-interactive";
import { DataTable } from "@/components/data-table";
import { SectionCards } from "@/components/section-cards";

import data from "./data.json";
import { useState } from "react";
import {
Empty,
EmptyContent,
EmptyDescription,
EmptyHeader,
EmptyMedia,
EmptyTitle,
} from "@/components/ui/empty";
import { User2Icon } from "lucide-react";

export default function Page() {
const [user, setUser] = useState(null);

if (!user) {
return (
<Empty>
<EmptyHeader>
<EmptyMedia>
<User2Icon />
</EmptyMedia>
<EmptyTitle>No User Data</EmptyTitle>
<EmptyDescription>
Please add a user to see the data.
</EmptyDescription>
</EmptyHeader>
<EmptyContent>
You can add a user by clicking the "Add User" button.
</EmptyContent>
</Empty>
);
}

return (
<div className="flex flex-col">
<div className="@container/main flex flex-col gap-2">
<div className="flex flex-col gap-4">
<SectionCards />
<div>
<ChartAreaInteractive />
</div>
<DataTable data={data} />
</div>
</div>
</div>
);
}
22 changes: 22 additions & 0 deletions app/(dashboard)/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import React from "react";
import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar";
import { AppSidebar } from "@/components/app-sidebar";
import { SiteHeader } from "@/components/site-header";

type Props = {
children: React.ReactNode;
};

const DashboardLayout = (props: Props) => {
return (
<SidebarProvider>
<AppSidebar variant="inset" />
<SidebarInset>
<SiteHeader />
<main className="p-6">{props.children}</main>
</SidebarInset>
</SidebarProvider>
);
};

export default DashboardLayout;
33 changes: 33 additions & 0 deletions app/(dashboard)/projects/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import {
Empty,
EmptyContent,
EmptyDescription,
EmptyHeader,
EmptyMedia,
EmptyTitle,
} from "@/components/ui/empty";
import { FolderIcon } from "lucide-react";

const Project = () => {
return (
<Empty className="bg-border h-120">
<EmptyHeader>
<EmptyMedia
variant="icon"
className="p-1 border-2 border-current/50 rounded-md"
>
<FolderIcon className="h-12 w-12 text-muted-foreground" />
</EmptyMedia>
<EmptyTitle>No Projects Found</EmptyTitle>
<EmptyDescription>
There are currently no projects to display.
</EmptyDescription>
</EmptyHeader>
<EmptyContent className="text-secondary">
Get started by creating a new project.
</EmptyContent>
</Empty>
);
};

export default Project;
Loading