Skip to content

Commit

Permalink
Fix issue closing embed item modal (#682)
Browse files Browse the repository at this point in the history
Signed-off-by: Cintia Sanchez Garcia <[email protected]>
  • Loading branch information
cynthia-sg authored Aug 6, 2024
1 parent 3264c8b commit 8f6ffff
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ui/embed-item/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ const App = () => {
onMount(() => {
// Listen for messages from the parent frame
window.addEventListener('message', (event) => {
setCurrentItem(event.data);
// If the message is to show the item details
if (event.data.type === 'showItemDetails') {
setCurrentItem(event.data);
}
});
// Subscribe to the itemsDataGetter to get the available keys
itemsDataGetter.subscribe({
Expand Down

0 comments on commit 8f6ffff

Please sign in to comment.