diff --git a/src/components/TableData.jsx b/src/components/TableData.jsx index dd24089..e5741d6 100644 --- a/src/components/TableData.jsx +++ b/src/components/TableData.jsx @@ -21,6 +21,7 @@ import Stats from "./Stats"; import ModalSuccess from "./ModalSuccess"; import ModalFailed from "./ModalFailed"; import TableSelectedItems from "./TableSelectedItems"; +import { LucideArrowUpRightFromSquare } from 'lucide-react'; @@ -53,8 +54,11 @@ function TableData() { const [supp, setSuppr] = useState('Date de suppression'); - console.log(isAuthenticated) - console.log(userId) + + + useEffect(() => { + // actualiser userID + }, []); diff --git a/src/context/UserContext.js b/src/context/UserContext.js index 625ded3..520bdf2 100644 --- a/src/context/UserContext.js +++ b/src/context/UserContext.js @@ -11,12 +11,12 @@ useEffect(() => { const token = localStorage.getItem('token'); const user_id = sessionStorage.getItem('user_id'); if (user_id) { - setUserId(user_id); - console.log(user_id) + setUserId(parseInt(user_id)); + //console.log(userId === 2) setIsLoading(false); } else if(token){ getUserId(token).then((valid) => { - setUserId(valid); + setUserId(parseInt(valid)); setIsLoading(false); }).catch((error) => { console.error('Erreur lors de la vérification du token:', error);