mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-15 21:15:56 +08:00
Revert "fix: update time stamp on the first load in URL to help with back navigation" (#4398)
This commit is contained in:
parent
f0669a6dc1
commit
7b344f7a75
@ -279,18 +279,6 @@ function DateTimeSelection({
|
|||||||
setRefreshButtonHidden(updatedTime === 'custom');
|
setRefreshButtonHidden(updatedTime === 'custom');
|
||||||
|
|
||||||
updateTimeInterval(updatedTime, [preStartTime, preEndTime]);
|
updateTimeInterval(updatedTime, [preStartTime, preEndTime]);
|
||||||
|
|
||||||
if (updatedTime !== 'custom') {
|
|
||||||
const { minTime, maxTime } = GetMinMax(updatedTime);
|
|
||||||
urlQuery.set(QueryParams.startTime, minTime.toString());
|
|
||||||
urlQuery.set(QueryParams.endTime, maxTime.toString());
|
|
||||||
} else {
|
|
||||||
urlQuery.set(QueryParams.startTime, preStartTime.toString());
|
|
||||||
urlQuery.set(QueryParams.endTime, preEndTime.toString());
|
|
||||||
}
|
|
||||||
const generatedUrl = `${location.pathname}?${urlQuery.toString()}`;
|
|
||||||
history.replace(generatedUrl);
|
|
||||||
|
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [location.pathname, updateTimeInterval, globalTimeLoading]);
|
}, [location.pathname, updateTimeInterval, globalTimeLoading]);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user