fix: populate url with tank ids

This commit is contained in:
tresabhi committed 2024-11-13 10:39:37 -06:00
1 parent ee3616e30b
commit b73676ad3c
1 file changed
+12
@@ -103,6 +103,18 @@ function Content() {
});
}, []);
useEffect(() => {
const search = new URLSearchParams(window.location.search);
search.set('tanks', members.map((member) => member.tank.id).join(','));
window.history.replaceState(
{},
'',
`${window.location.pathname}?${search.toString()}`,
);
}, [members]);
return (
<PageWrapper color="crimson" size="100%">
<Flex justify="center" gap="4" align="center" direction="column">