From ea40b43d0ff1746a5685d4a3d9a6720addd52e4e Mon Sep 17 00:00:00 2001 From: Samuel Therrien Date: Thu, 14 Nov 2024 17:55:21 -0500 Subject: [PATCH] Revert "Commit from GitHub Actions (Frontend PR validation)" This reverts commit 106a59026134d8d7122b0d428d24b9ecf3713b2e. --- canopeum_frontend/.eslintrc.cjs | 6 +++++- canopeum_frontend/src/components/Navbar.tsx | 11 ++++++----- .../src/components/settings/AdminCard.tsx | 1 - canopeum_frontend/src/utils/arrayUtils.ts | 1 - 4 files changed, 11 insertions(+), 8 deletions(-) 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 (