about summary refs log tree commit diff
path: root/src/components/TimePicker/TimePicker.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/TimePicker/TimePicker.tsx')
-rw-r--r--src/components/TimePicker/TimePicker.tsx16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/components/TimePicker/TimePicker.tsx b/src/components/TimePicker/TimePicker.tsx
index 174db31..bec1a24 100644
--- a/src/components/TimePicker/TimePicker.tsx
+++ b/src/components/TimePicker/TimePicker.tsx
@@ -1,20 +1,10 @@
-import { DateRangePicker, Provider, defaultTheme } from '@adobe/react-spectrum'
-import { useState } from 'react';
-import { today, getLocalTimeZone } from '@internationalized/date';
+import { DateRangePicker } from '@adobe/react-spectrum'
 
-
-export default function TimePicker() {
-	const endTimeframe = today(getLocalTimeZone());
-	const [value, setValue] = useState({
-		start: endTimeframe.subtract({ days: 7 }),
-		end: endTimeframe
-	});
+export default function TimePicker(props: any) {
 
 	return (
 		<>
-			<Provider theme={defaultTheme}>
-				<DateRangePicker aria-label="timeframe" value={value} onChange={setValue} />
-			</Provider>
+			<DateRangePicker aria-label="timeframe" value={props.timeframe} onChange={props.setTimeframe} />
 		</>
 	)
 }