preventing scroll reset in case of message
This commit is contained in:
@@ -83,12 +83,6 @@ export const MonthLocationList:React.FC<MonthLocationListProps > = ({
|
|||||||
params.delete('locationDeleted');
|
params.delete('locationDeleted');
|
||||||
messageShown = true;
|
messageShown = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clean up URL parameters if any message was shown
|
|
||||||
if (messageShown) {
|
|
||||||
const newSearch = params.toString();
|
|
||||||
router.replace(newSearch ? `?${newSearch}` : '/');
|
|
||||||
}
|
|
||||||
}, [search, router, t]);
|
}, [search, router, t]);
|
||||||
|
|
||||||
if(!availableYears || !months) {
|
if(!availableYears || !months) {
|
||||||
|
|||||||
Reference in New Issue
Block a user