dashboard: just toggle one chart at the time (overview)

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-03-21 09:55:46 +01:00
parent 7ba60cdaf3
commit e78e88e267
8 changed files with 42 additions and 36 deletions

View File

@@ -16,12 +16,6 @@ import { mapKeys } from '@openpanel/validation';
const nuqsOptions = { history: 'push' } as const;
export function useOverviewOptions() {
const [chartType, setChartType] = useQueryState(
'ct',
parseAsStringEnum(['bar', 'linear'])
.withDefault('bar')
.withOptions(nuqsOptions)
);
const [previous, setPrevious] = useQueryState(
'compare',
parseAsBoolean.withDefault(true).withOptions(nuqsOptions)
@@ -74,9 +68,5 @@ export function useOverviewOptions() {
// Toggles
liveHistogram,
setLiveHistogram,
// Other
chartType,
setChartType,
};
}