Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzad31 committed Jan 15, 2020
1 parent 19d0c5a commit 37bd51d
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const defaultContext: UptimeSettingsContextValues = {
export const UptimeSettingsContext = createContext(defaultContext);

export const UptimeSettingsContextProvider: React.FC<UptimeAppProps> = ({ children, ...props }) => {
const { basePath, isApmAvailable, isInfraAvailable, isLogsAvailable } = props;
const { basePath, isApmAvailable, isInfraAvailable, isLogsAvailable, commonlyUsedRanges } = props;

const { dateRangeStart, dateRangeEnd } = useParams();

Expand All @@ -47,10 +47,19 @@ export const UptimeSettingsContextProvider: React.FC<UptimeAppProps> = ({ childr
isApmAvailable,
isInfraAvailable,
isLogsAvailable,
commonlyUsedRanges,
dateRangeStart: dateRangeStart ?? DATE_RANGE_START,
dateRangeEnd: dateRangeEnd ?? DATE_RANGE_END,
};
}, [basePath, isApmAvailable, isInfraAvailable, isLogsAvailable, dateRangeStart, dateRangeEnd]);
}, [
basePath,
isApmAvailable,
isInfraAvailable,
isLogsAvailable,
dateRangeStart,
dateRangeEnd,
commonlyUsedRanges,
]);

return <UptimeSettingsContext.Provider value={value} children={children} />;
};

0 comments on commit 37bd51d

Please sign in to comment.