Skip to content

Commit

Permalink
console: Update tutorial variable to tutorialSeen
Browse files Browse the repository at this point in the history
  • Loading branch information
mjamescompton committed Jan 10, 2025
1 parent 213cd70 commit 3403696
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/webui/console/containers/event-split-frame/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ const EventSplitFrameInner = ({ children }) => {
const userId = useSelector(selectUserId)
const user = useSelector(state => selectUserById(state, userId))
const consolePreferences = useSelector(state => selectConsolePreferences(state))
const tutorials = consolePreferences.tutorials?.seen || []
const seen = tutorials.includes('TUTORIAL_LIVE_DATA_SPLIT_VIEW')
const tutorialsSeen = consolePreferences.tutorials?.seen || []
const seen = tutorialsSeen.includes('TUTORIAL_LIVE_DATA_SPLIT_VIEW')

useEffect(() => {
setIsMounted(true)
Expand All @@ -58,13 +58,13 @@ const EventSplitFrameInner = ({ children }) => {
const patch = {
console_preferences: {
tutorials: {
seen: [...tutorials, 'TUTORIAL_LIVE_DATA_SPLIT_VIEW'],
seen: [...tutorialsSeen, 'TUTORIAL_LIVE_DATA_SPLIT_VIEW'],
},
},
}

await dispatch(attachPromise(updateUser({ id: user.ids.user_id, patch })))
}, [dispatch, tutorials, user.ids.user_id])
}, [dispatch, tutorialsSeen, user.ids.user_id])

// Handle the dragging of the handler to resize the frame.
const handleDragStart = useCallback(
Expand Down

0 comments on commit 3403696

Please sign in to comment.