Update Retention report.
This commit is contained in:
17
src/components/input/WebsiteMonthSelect.tsx
Normal file
17
src/components/input/WebsiteMonthSelect.tsx
Normal file
@@ -0,0 +1,17 @@
|
||||
import { useDateRange } from '@/components/hooks';
|
||||
import { dateToRangeValue } from '@/lib/date';
|
||||
import { MonthSelect } from './MonthSelect';
|
||||
|
||||
export function WebsiteMonthSelect({ websiteId }: { websiteId: string }) {
|
||||
const {
|
||||
dateRange: { startDate },
|
||||
saveDateRange,
|
||||
} = useDateRange(websiteId);
|
||||
|
||||
const handleMonthSelect = (date: Date) => {
|
||||
const range = dateToRangeValue(date);
|
||||
saveDateRange(range);
|
||||
};
|
||||
|
||||
return <MonthSelect date={startDate} onChange={handleMonthSelect} />;
|
||||
}
|
||||
Reference in New Issue
Block a user