diff --git a/apps/marketing/src/app/(marketing)/open/cap-table.tsx b/apps/marketing/src/app/(marketing)/open/cap-table.tsx index 9bf4f9023..214d14e03 100644 --- a/apps/marketing/src/app/(marketing)/open/cap-table.tsx +++ b/apps/marketing/src/app/(marketing)/open/cap-table.tsx @@ -2,15 +2,11 @@ import { HTMLAttributes } from 'react'; -import { Cell, Pie, PieChart } from 'recharts'; +import { Cell, Pie, PieChart, Tooltip } from 'recharts'; import { cn } from '@documenso/ui/lib/utils'; -const data = [ - { name: 'Founders', percentage: 75.5 }, - { name: 'Investors', percentage: 14.5 }, - { name: 'Team Pool', percentage: 10 }, -]; +import { CAP_TABLE } from './data'; const COLORS = ['#7fd843', '#a2e771', '#c6f2a4']; @@ -36,7 +32,7 @@ export const CapTable = ({ className, ...props }: CapTableProps) => {
{ fill="#8884d8" dataKey="percentage" > - {data.map((entry, index) => ( + {CAP_TABLE.map((entry, index) => ( ))} + { + return [`${percent}%`, name || props['name'] || props['payload']['name']]; + }} + />
diff --git a/apps/marketing/src/app/(marketing)/open/data.ts b/apps/marketing/src/app/(marketing)/open/data.ts index 083f653dc..5a5bc2451 100644 --- a/apps/marketing/src/app/(marketing)/open/data.ts +++ b/apps/marketing/src/app/(marketing)/open/data.ts @@ -95,16 +95,7 @@ export const SALARY_BANDS = [ ]; export const CAP_TABLE = [ - { - shareholder: 'Founders', - percentage: '75.5', - }, - { - shareholder: 'Investors', - percentage: '14.5', - }, - { - shareholder: 'Team Pool', - percentage: '10', - }, + { name: 'Founders', percentage: 75.5 }, + { name: 'Investors', percentage: 14.5 }, + { name: 'Team Pool', percentage: 10 }, ];