Skip to content

Commit

Permalink
Fetch unique tags
Browse files Browse the repository at this point in the history
  • Loading branch information
koechkevin committed Sep 28, 2023
1 parent e7bc3d2 commit 356dba4
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions apps/codeforafrica/src/components/Projects/Projects.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-env browser */
import { Section } from "@commons-ui/core";
import { Stack } from "@mui/material";
import { useRouter } from "next/router";
Expand Down Expand Up @@ -55,14 +56,12 @@ const Projects = React.forwardRef(function Projects(
}, [data]);

useEffect(() => {
if (router.isReady) {
const [pathname] = router.asPath.split("?");
const url = pathname ? `${pathname}${queryParams}` : queryParams;
router.push(url, undefined, {
scroll: true,
shallow: true,
});
}
const { pathname } = window.location;
const url = pathname ? `${pathname}${queryParams}` : queryParams;
router.push(url, undefined, {
scroll: true,
shallow: true,
});
// We don't want to listen to router changes here since we're the ones
// updating them
// eslint-disable-next-line react-hooks/exhaustive-deps
Expand Down

0 comments on commit 356dba4

Please sign in to comment.