Skip to content

Commit

Permalink
Simplify not found page logic
Browse files Browse the repository at this point in the history
  • Loading branch information
cskrov committed Oct 1, 2024
1 parent 9ceea0b commit d9fd6d9
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions frontend/src/routes/not-found-page.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
import { ENVIRONMENT } from '@app/environment/environment';
import { redirectToNav } from '@app/functions/redirect-to-nav';
import { useEffect } from 'react';

export const NotFoundPage = () => {
useEffect(() => {
console.warn('404 - Redirecting to www.nav.no/klage');

if (!ENVIRONMENT.isLocal) {
redirectToNav();
}
}, []);
useEffect(redirectToNav, []);

return null;
};

0 comments on commit d9fd6d9

Please sign in to comment.