add env var to remove user registration

This commit is contained in:
Romulus21 committed 2024-03-04 17:17:46 +01:00
1 parent 6dd147c3e2
commit 6609738650
6 files changed
+25 -6

No files matched your search

+1 -1
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'
}
}