Skip to content

Commit

Permalink
fix: fix broken URL when you are using Range filter (#2204)
Browse files Browse the repository at this point in the history
  • Loading branch information
a0m0rajab authored Nov 27, 2023
1 parent 660b861 commit fcf8080
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion layouts/filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const FilterLayout = ({ children }: { children: React.ReactNode }) => {
const { range } = router.query;

useEffect(() => {
if (!range) {
if (router.isReady && !range) {
setQueryParams({ range: "30" });
}
}, [range, router.isReady]);
Expand Down
2 changes: 1 addition & 1 deletion layouts/hub-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const HubPageLayout = ({ children }: { children: React.ReactNode }) => {
const repositories = insight?.repos.map((repo) => repo.repo_id);

useEffect(() => {
if (!range) {
if (router.isReady && !range) {
setQueryParams({ range: "30" });
}
}, [range, router.isReady]);
Expand Down

0 comments on commit fcf8080

Please sign in to comment.