Skip to content

Commit

Permalink
chore: staging deploy for demo
Browse files Browse the repository at this point in the history
  • Loading branch information
dahal committed Jun 3, 2024
1 parent f788912 commit 7b52891
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 96 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import EmptyState from "@/components/common/empty-state";
import { Button } from "@/components/ui/button";
import { RiPieChartFill } from "@remixicon/react";
import { type Metadata } from "next";
import type { Metadata } from "next";

export const metadata: Metadata = {
title: "Cap table",
Expand Down
68 changes: 0 additions & 68 deletions src/app/(authenticated)/(dashboard)/[publicId]/overview/page.tsx

This file was deleted.

72 changes: 59 additions & 13 deletions src/app/(authenticated)/(dashboard)/[publicId]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,68 @@
import EmptyState from "@/components/common/empty-state";
import { Button } from "@/components/ui/button";
import { RiPieChartFill } from "@remixicon/react";
import ActivitiesCard from "@/components/dashboard/overview/activities-card";
import DonutCard from "@/components/dashboard/overview/donut-card";
import SummaryTable from "@/components/dashboard/overview/summary-table";
import OverviewCard from "@/components/dashboard/overview/top-card";
import type { Metadata } from "next";

export const metadata: Metadata = {
title: "Cap table",
title: "Overview",
};

const CaptablePage = () => {
const OverviewPage = ({
params: { publicId },
}: {
params: { publicId: string };
}) => {
return (
<EmptyState
icon={<RiPieChartFill />}
title="Work in progress."
subtitle="This page is not yet available."
>
<Button size="lg">Import existing captable</Button>
</EmptyState>
<>
{/* <EmptyOverview firstName={firstName} publicCompanyId={publicCompanyId} /> */}

<header>
<h3 className="font-medium">Overview</h3>
<p className="text-sm text-muted-foreground">
View your company{`'`}s captable overview
</p>
</header>

<div className="grid gap-8 md:grid-cols-12">
<div className="sm:col-span-12 md:col-span-6 lg:col-span-8">
{/* Overview */}
<section className="mt-6">
<div className="grid grid-cols-2 gap-8 md:grid-cols-2 lg:grid-cols-3">
<OverviewCard
title="Amount raised"
amount={28000000}
prefix="$"
/>
<OverviewCard title="Diluted shares" amount={7560010} />
<OverviewCard title="Stakeholders" amount={28} format={false} />
</div>
</section>

{/* Tremor chart */}
<section className="mt-6">
<DonutCard />
</section>
</div>

<div className="mt-6 sm:col-span-12 md:col-span-6 lg:col-span-4">
<ActivitiesCard
publicId={publicId}
className="border-none bg-transparent shadow-none"
/>
</div>
</div>

<div className="mt-10">
<h4 className="font-medium">Summary</h4>
<p className="text-sm text-muted-foreground">
Summary of your company{`'`}s captable
</p>

<SummaryTable />
</div>
</>
);
};

export default CaptablePage;
export default OverviewPage;
28 changes: 14 additions & 14 deletions src/components/dashboard/sidebar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import {
RiFolderChartLine,
RiGroup2Fill,
RiGroup2Line,
// RiHome2Fill,
// RiHome2Line,
RiHome2Fill,
RiHome2Line,
RiListCheck3,
RiListIndefinite,
RiMailSendFill,
Expand All @@ -41,19 +41,19 @@ import { ScrollArea } from "@/components/ui/scroll-area";
import { cn } from "@/lib/utils";
import { NavLink } from "./nav-link";

import { type TGetCompanyList } from "@/server/company";
import type { TGetCompanyList } from "@/server/company";
import { CompanySwitcher } from "./company-switcher";

const navigation = [
// {
// name: "Overview",
// href: "/",
// icon: RiHome2Line,
// activeIcon: RiHome2Fill,
// },
{
name: "Cap table",
name: "Overview",
href: "/",
icon: RiHome2Line,
activeIcon: RiHome2Fill,
},
{
name: "Cap table",
href: "/captable",
icon: RiPieChartLine,
activeIcon: RiPieChartFill,
},
Expand Down Expand Up @@ -220,7 +220,7 @@ export function SideBar({ className, publicId, companies }: SideBarProps) {
</div>

<div className="overflow-auto py-2">
<ul role="list" className="space-y-1">
<ul className="space-y-1">
{navigation.map((item) => {
const href = basePath + item.href;
const isActive =
Expand Down Expand Up @@ -267,12 +267,12 @@ export function SideBar({ className, publicId, companies }: SideBarProps) {
</div>

<AccordionContent>
<ul role="list" className="space-y-1">
<ul className="space-y-1">
{item.subNav.map((subItem) => {
const href =
basePath + item.href + subItem.href;
const isActive =
(subItem.href != "/" &&
(subItem.href !== "/" &&
currentPath.includes(
item.href + subItem.href,
)) ||
Expand Down Expand Up @@ -310,7 +310,7 @@ export function SideBar({ className, publicId, companies }: SideBarProps) {
<div className="text-xs font-semibold leading-6 text-gray-400">
Company
</div>
<ul role="list" className="space-y-1">
<ul className="space-y-1">
{company.map((item) => {
const href = basePath + item.href;
const isActive =
Expand Down

0 comments on commit 7b52891

Please sign in to comment.