update project
This commit is contained in:
@@ -31,8 +31,8 @@ export const AuthUserProvider = ({children}: PropsWithChildren) => {
|
||||
// @ts-expect-error check axios response status
|
||||
if (error.response.status === 401) {
|
||||
console.info('no user login')
|
||||
let url = window.location.pathname.split('/')[1]
|
||||
if (!['connexion', 'changer-le-mot-de-passe'].includes(url)) {
|
||||
const url = window.location.pathname.split('/')[1]
|
||||
if (!['connexion', 'changer-le-mot-de-passe', 'sinscrire'].includes(url)) {
|
||||
window.location.href = '/connexion'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {useState} from "react"
|
||||
import axios, {AxiosError} from "axios"
|
||||
import React from "react"
|
||||
import {cleanErrorsForm, displayFormErrors, ValidationErrors} from "../utilities/form"
|
||||
import {cleanErrorsForm, displayFormErrors} from "../utilities/form"
|
||||
|
||||
const useAxiosTools = () => {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user