Skip to content

Commit

Permalink
Commit from GitHub Actions (Frontend PR validation)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 14, 2024
1 parent 0ce762b commit e0d13b9
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 e0d13b9

Please sign in to comment.