add env var to remove user registration

This commit is contained in:
Romulus21
2024-03-04 17:17:46 +01:00
parent 6dd147c3e2
commit 6609738650
6 changed files with 25 additions and 6 deletions

View File

@@ -31,7 +31,7 @@ export const AuthUserProvider = ({children}: PropsWithChildren) => {
// @ts-expect-error 401 error to redirect
if (error.response.status === 401) {
console.info('no user login')
if (!['/connexion', '/inscription'].includes(window.location.pathname)) {
if (!['/connexion', '/sinscrire'].includes(window.location.pathname)) {
window.location.href = '/connexion'
}
}