Skip to content

Commit

Permalink
Merge branch 'Bump-eslint-config-beslogic-to-3.0.0' of https://github…
Browse files Browse the repository at this point in the history
….com/BesLogic/releaf-canopeum into Bump-eslint-config-beslogic-to-3.0.0
  • Loading branch information
Samuel-Therrien-Beslogic committed Nov 15, 2024
2 parents 792ebf9 + 015989b commit e925fc5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
6 changes: 1 addition & 5 deletions canopeum_frontend/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
11 changes: 5 additions & 6 deletions canopeum_frontend/src/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,25 +51,24 @@ const Navbar = () => {
const location = useLocation()

const handleChangeLanguage = () => {
const newLanguage = currentLanguage === 'en' ? 'fr' : 'en'
const newLanguage = currentLanguage === 'en'
? 'fr'
: 'en'
setCurrentLanguage(newLanguage)
void changeLanguage(newLanguage)
}

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 (
<nav className='navbar sticky-top navbar-expand-lg navbar-dark bg-primary'>
<div className='container-fluid'>
Expand Down
1 change: 1 addition & 0 deletions canopeum_frontend/src/components/settings/AdminCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const AdminCard = ({ admin }: Props) => (
{admin.sites.map(site => (
<div className='d-flex align-items-center text-primary' key={site.id}>
{

/* See TODO
<span className='material-symbols-outlined'>
{getSiteTypeIconKey(site.siteType.id)}
Expand Down
1 change: 1 addition & 0 deletions canopeum_frontend/src/utils/arrayUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const mapSum = <
values.reduce(
(previous, current) =>
previous + (

/* total-functions/no-unsafe-type-assertion --
The retriction using KeysWithValsOfType ensures the value obtained from the key is of known
type. We don't want the the objects to be restricted to *only* those value types */
Expand Down

0 comments on commit e925fc5

Please sign in to comment.