chore: add prettier with config and format all files
This commit is contained in:
@@ -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} />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user