Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/editor/hooks/use-interactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,19 +244,22 @@ const useInteractions = () => {
}

const interactions = select( 'interact/interactions' ).getInteractions()
const interactionsFiltered = interactions.filter( interaction => isInteractionShown( interaction, select ) )

return {
interactions,
interactionsFiltered,
setInteractions,
updateInteraction,
deleteInteraction,
}
}, [] )

const interactionsFiltered = useSelect( select => {
return data.interactions.filter( interaction => isInteractionShown( interaction, select ) )
}, [ data ] )
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated

return {
loadingError: useSelect( select => select( 'interact/interactions' ).getLoadingError(), [] ),
interactionsFiltered,
...data,
}
}
Expand Down
Loading