add env var to remove user registration
This commit is contained in:
1 parent
6dd147c3e2
commit
6609738650
6 files changed
+25
-6
No files matched your search
@@ -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'
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user