Skip to content

Commit

Permalink
fix(landingpage): prevent redirection to 404 (#1311)
Browse files Browse the repository at this point in the history
remove trailing slash in route path
  • Loading branch information
BenPag authored Mar 12, 2024
1 parent bcfc216 commit 30436c5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/landingpage/app/not-found.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ export default function NotFound() {
const pathName = usePathname();

useEffect(() => {
if (pathName.endsWith('/')) {
return router.replace(pathName.slice(0, -1));
}

const [lang] = navigator.language.split('-');
const fallbackLang = getValidLang(lang);

Expand Down

0 comments on commit 30436c5

Please sign in to comment.