From 07249b38b2f7aa7fbdd4b84050bf0e9d9067c1b3 Mon Sep 17 00:00:00 2001 From: Ephraim Atta-Duncan Date: Wed, 16 Aug 2023 18:37:48 +0000 Subject: [PATCH] chore: add responsive container to pie chart --- .../src/app/(marketing)/open/cap-table.tsx | 48 ++++++++++--------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/apps/marketing/src/app/(marketing)/open/cap-table.tsx b/apps/marketing/src/app/(marketing)/open/cap-table.tsx index e1a0913c1..df45de501 100644 --- a/apps/marketing/src/app/(marketing)/open/cap-table.tsx +++ b/apps/marketing/src/app/(marketing)/open/cap-table.tsx @@ -2,7 +2,7 @@ import { HTMLAttributes, useEffect, useState } from 'react'; -import { Cell, Pie, PieChart, Tooltip } from 'recharts'; +import { Cell, Pie, PieChart, ResponsiveContainer, Tooltip } from 'recharts'; import { cn } from '@documenso/ui/lib/utils'; @@ -53,28 +53,30 @@ export const CapTable = ({ className, ...props }: CapTableProps) => {
{!isSSR && ( - - - {CAP_TABLE.map((entry, index) => ( - - ))} - - { - return [`${percent}%`, name || props['name'] || props['payload']['name']]; - }} - /> - + + + + {CAP_TABLE.map((entry, index) => ( + + ))} + + { + return [`${percent}%`, name || props['name'] || props['payload']['name']]; + }} + /> + + )}