chore: add prettier with config and format all files

This commit is contained in:
Sebastian Seedorf
2026-06-04 11:44:20 +02:00
parent d212ae3f30
commit cf9bb33ecb
50 changed files with 1290 additions and 714 deletions

View File

@@ -6,20 +6,29 @@ import TableViz from './TableViz';
import DividerCard from './DividerCard';
export interface ChartCardProps {
config: ChartConfig;
rows: SignalRow[];
upsRows: UpsRow[];
config: ChartConfig;
rows: SignalRow[];
upsRows: UpsRow[];
sessions: SessionBoundary[];
alerts: AlertConfig[];
alerts: AlertConfig[];
timeMode: TimeMode;
onEdit: () => void;
onEdit: () => void;
onDelete: () => void;
}
export default function ChartCard(props: ChartCardProps) {
const { config } = props;
if (config.chart_type === 'divider') return <DividerCard title={config.title} onEdit={props.onEdit} onDelete={props.onDelete} />;
if (config.chart_type === 'ups') return <UpsChart {...props} />;
if (config.viz_type === 'table') return <TableViz config={props.config} rows={props.rows} onEdit={props.onEdit} onDelete={props.onDelete} />;
return <SignalsChart {...props} />;
}
if (config.chart_type === 'divider')
return <DividerCard title={config.title} onEdit={props.onEdit} onDelete={props.onDelete} />;
if (config.chart_type === 'ups') return <UpsChart {...props} />;
if (config.viz_type === 'table')
return (
<TableViz
config={props.config}
rows={props.rows}
onEdit={props.onEdit}
onDelete={props.onDelete}
/>
);
return <SignalsChart {...props} />;
}