From e0d13b9c451da63f86e23cda07c70738e8291b13 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 14 Nov 2024 23:40:14 +0000 Subject: [PATCH] Commit from GitHub Actions (Frontend PR validation) --- 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, 8 insertions(+), 11 deletions(-) diff --git a/canopeum_frontend/.eslintrc.cjs b/canopeum_frontend/.eslintrc.cjs index 312715e76..73d03d6fd 100644 --- a/canopeum_frontend/.eslintrc.cjs +++ b/canopeum_frontend/.eslintrc.cjs @@ -67,11 +67,7 @@ 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 64fe649b7..d050455dd 100644 --- a/canopeum_frontend/src/components/Navbar.tsx +++ b/canopeum_frontend/src/components/Navbar.tsx @@ -51,7 +51,9 @@ const Navbar = () => { const location = useLocation() const handleChangeLanguage = () => { - const newLanguage = currentLanguage === 'en' ? 'fr' : 'en' + const newLanguage = currentLanguage === 'en' +? 'fr' +: 'en' setCurrentLanguage(newLanguage) void changeLanguage(newLanguage) } @@ -59,17 +61,14 @@ 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 (