diff --git a/src/lib/components/linetemporalchart/MetricTimespanProvider.tsx b/src/lib/components/linetemporalchart/MetricTimespanProvider.tsx index 25751fff64..f815be05bc 100644 --- a/src/lib/components/linetemporalchart/MetricTimespanProvider.tsx +++ b/src/lib/components/linetemporalchart/MetricTimespanProvider.tsx @@ -1,12 +1,13 @@ import { createContext, useContext, useEffect, useState } from 'react'; import { QueryTimeSpan, queryTimeSpansCodes } from '../constants'; +import { useLocation } from 'react-router-dom'; export const MetricsTimeSpanContext = createContext(null); export const MetricsTimeSpanProvider = ({ children, location, }: { children: JSX.Element; - location?: Location; + location?: ReturnType; }) => { // the default timespan is the last 24h const [queryTimeSpanCode, setQueryTimeSpanCode] = useState(