Skip to content

Commit

Permalink
Fix issue closing embed item modal
Browse files Browse the repository at this point in the history
Signed-off-by: Cintia Sanchez Garcia <[email protected]>
  • Loading branch information
cynthia-sg committed Aug 6, 2024
1 parent 3264c8b commit de17a96
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 de17a96

Please sign in to comment.