diff --git a/src/components/NavBar/NavBar.jsx b/src/components/NavBar/NavBar.jsx index b9514b1..c2bc464 100644 --- a/src/components/NavBar/NavBar.jsx +++ b/src/components/NavBar/NavBar.jsx @@ -2,14 +2,10 @@ import { useAuth } from "../../hooks"; import "./NavBar.scss"; import { logout } from "../../api"; import { Link } from "react-router-dom/"; -import { getRoomsLength } from "../../api"; -import { useEffect } from "react"; -import { useState } from "react"; import refresh from "../../services/pageManagement"; export default function NavBar() { const { user } = useAuth(); - const [roomsLength, setRoomsLength] = useState(null); const onLogout = () => { logout().then((res) => { @@ -19,43 +15,25 @@ export default function NavBar() { }); }; - const refreshAllDatas = async () => { - const roomsLen = await getRoomsLength(); - if (!roomsLen) { - return; - } - setRoomsLength(roomsLen); - }; - - useEffect(() => { - refreshAllDatas(); - }, []); - return (