diff --git a/src/components/Roadmaps/RoadmapsPage.tsx b/src/components/Roadmaps/RoadmapsPage.tsx index bdf93eb41..eb1c4896a 100644 --- a/src/components/Roadmaps/RoadmapsPage.tsx +++ b/src/components/Roadmaps/RoadmapsPage.tsx @@ -3,6 +3,11 @@ import { cn } from '../../lib/classname.ts'; import { Filter, X } from 'lucide-react'; import { CategoryFilterButton } from './CategoryFilterButton.tsx'; import { useOutsideClick } from '../../hooks/use-outside-click.ts'; +import { + deleteUrlParam, + getUrlParams, + setUrlParams, +} from '../../lib/browser.ts'; const groupNames = [ 'Absolute Beginners', @@ -468,6 +473,15 @@ export function RoadmapsPage() { ]); }, [activeGroup]); + useEffect(() => { + const { g } = getUrlParams() as { g: AllowGroupNames }; + if (!g) { + return; + } + + setActiveGroup(g); + }, []); + return (