refactor period (rolling/calender) to periodType

This commit is contained in:
2026-05-01 17:17:17 +05:30
parent e82cad4f21
commit 38f7416942
2 changed files with 5 additions and 5 deletions

View File

@@ -25,7 +25,7 @@ export default function DashboardView({
}: ViewProps) {
const theme = useTheme();
const themeMode = theme.palette.mode;
const { mode, period, comparison } = state;
const { mode, periodType, comparison } = state;
// Resolve colors with fallbacks
const colors = React.useMemo(() => {
@@ -139,8 +139,8 @@ export default function DashboardView({
title={section.title}
accentColor={colors.primary}
colorScheme={colors}
periodType={period}
onPeriodTypeChange={(p: any) => setState(prev => ({ ...prev, period: p }))}
periodType={periodType}
onPeriodTypeChange={(p: any) => setState(prev => ({ ...prev, periodType: p }))}
comparison={comparison}
setComparison={(c: any) => setState(prev => ({ ...prev, comparison: c }))}
/>