Skip to content

Commit

Permalink
error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
KelvinTegelaar committed Jun 24, 2024
1 parent 5dd3559 commit e2ddd2d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/layout/AppHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,13 @@ const AppHeader = () => {
//if none is found, set the setupCompleted state to true
useEffect(() => {
if (dashboard && dashboard.length >= 1) {
console.log('Finding if setup is completed.')
const setupCompleted = dashboard.find((alert) => alert.setupCompleted === false)
if (setupCompleted) {
console.log("Setup isn't completed yet, we found a match with false.")
dispatch(setSetupCompleted({ setupCompleted: false }))
} else {
console.log('Setup is completed.')
dispatch(setSetupCompleted({ setupCompleted: true }))
}
}
Expand Down

0 comments on commit e2ddd2d

Please sign in to comment.