diff --git a/canopeum_frontend/.eslintrc.cjs b/canopeum_frontend/.eslintrc.cjs index 73d03d6fd..312715e76 100644 --- a/canopeum_frontend/.eslintrc.cjs +++ b/canopeum_frontend/.eslintrc.cjs @@ -67,7 +67,11 @@ module.exports = { ], ], }, - ], + + + + + ], // Using Bootraps directly without a React wrapper // will cause us to have to add classes to React Components 'react/forbid-component-props': 'off', diff --git a/canopeum_frontend/src/components/Navbar.tsx b/canopeum_frontend/src/components/Navbar.tsx index d050455dd..64fe649b7 100644 --- a/canopeum_frontend/src/components/Navbar.tsx +++ b/canopeum_frontend/src/components/Navbar.tsx @@ -51,9 +51,7 @@ const Navbar = () => { const location = useLocation() const handleChangeLanguage = () => { - const newLanguage = currentLanguage === 'en' -? 'fr' -: 'en' + const newLanguage = currentLanguage === 'en' ? 'fr' : 'en' setCurrentLanguage(newLanguage) void changeLanguage(newLanguage) } @@ -61,14 +59,17 @@ const Navbar = () => { const { isAuthenticated, logout } = useContext(AuthenticationContext) const navigate = useNavigate() - const onLoginLogoutbuttonClick = useCallback(() => { + const onLoginLogoutbuttonClick = (useCallback(() => { if (isAuthenticated) { logout() } else { navigate(appRoutes.login) } - }, [isAuthenticated, navigate, logout]) + }, [isAuthenticated, navigate, logout])) + + + return (