Front: If resource is not found, redirect to Error View

This commit is contained in:
Arthur Jamet
2023-06-21 17:16:22 +01:00
committed by Clément Le Bihan
parent 45595408fe
commit 3e84605c59
7 changed files with 53 additions and 7 deletions
+6
View File
@@ -27,6 +27,7 @@ import ArtistDetailsView from './views/ArtistDetailsView';
import { Button, Center, VStack } from 'native-base';
import { unsetAccessToken } from './state/UserSlice';
import TextButton from './components/TextButton';
import ErrorView from './views/ErrorView';
const protectedRoutes = () =>
({
@@ -64,6 +65,11 @@ const protectedRoutes = () =>
options: { title: translate('search') },
link: '/search/:query?',
},
Error: {
component: ErrorView,
options: { title: translate('error'), headerLeft: null },
link: undefined,
},
User: { component: ProfileView, options: { title: translate('user') }, link: '/user' },
} as const);