Files
stats/apps/start/src/components/report/sidebar/ReportSidebar.tsx
Carl-Gerhard Lindesvärd ed1c57dbb8 feat: share dashboard & reports, sankey report, new widgets
* fix: prompt card shadows on light mode

* fix: handle past_due and unpaid from polar

* wip

* wip

* wip 1

* fix: improve types for chart/reports

* wip share
2026-01-14 09:21:18 +01:00

37 lines
1.1 KiB
TypeScript

import { Button } from '@/components/ui/button';
import { SheetClose, SheetFooter } from '@/components/ui/sheet';
import { useSelector } from '@/redux';
import { ReportBreakdowns } from './ReportBreakdowns';
import { ReportSeries } from './ReportSeries';
import { ReportSettings } from './ReportSettings';
import { ReportFixedEvents } from './report-fixed-events';
export function ReportSidebar() {
const { chartType, options } = useSelector((state) => state.report);
const showBreakdown = chartType !== 'retention' && chartType !== 'sankey';
const showFixedEvents = chartType === 'sankey';
return (
<>
<div className="flex flex-col gap-8">
{showFixedEvents ? (
<ReportFixedEvents
numberOfEvents={
options?.type === 'sankey' && options.mode === 'between' ? 2 : 1
}
/>
) : (
<ReportSeries />
)}
{showBreakdown && <ReportBreakdowns />}
<ReportSettings />
</div>
<SheetFooter>
<SheetClose asChild>
<Button className="w-full">Done</Button>
</SheetClose>
</SheetFooter>
</>
);
}