feat: shallow: true on router.replace

This commit is contained in:
Vyacheslav Matyukhin 2022-03-26 14:33:16 +03:00
parent d921885f1b
commit bb846068f3
No known key found for this signature in database
GPG Key ID: 3D2A774C5489F96C

View File

@ -164,10 +164,14 @@ const CommonDisplay: React.FC<Props> = ({
if (numDisplay !== defaultNumDisplay) query["numDisplay"] = numDisplay; if (numDisplay !== defaultNumDisplay) query["numDisplay"] = numDisplay;
router.replace({ router.replace(
{
pathname: router.pathname, pathname: router.pathname,
query, query,
}); },
undefined,
{ shallow: true }
);
}; };
useNoInitialEffect(updateRoute, [numDisplay]); useNoInitialEffect(updateRoute, [numDisplay]);