window.location.search --> location.search(react-router)

This commit is contained in:
dhrubesh-makeen 2021-04-24 03:55:22 +05:30
parent 55e86ead02
commit 05f40224b9

View File

@ -45,8 +45,7 @@ const _DateTimeSelector = (props: DateTimeSelectorProps) => {
const timeDurationInLocalStorage = localStorage.getItem(
LOCAL_STORAGE.METRICS_TIME_IN_DURATION,
);
const urlParams = new URLSearchParams(window.location.search);
const urlParams = new URLSearchParams(location.search);
const intervalInQueryParam = urlParams.get(METRICS_PAGE_QUERY_PARAM.interval);
const startTimeString = urlParams.get(METRICS_PAGE_QUERY_PARAM.startTime);
const endTimeString = urlParams.get(METRICS_PAGE_QUERY_PARAM.endTime);