1
0
Fork 0
mirror of synced 2024-07-09 00:06:05 +12:00

Add event for block ejection

This commit is contained in:
Andrew Kingston 2023-09-26 09:14:53 +01:00
parent 3ab119ebf0
commit 7bf32176a7
2 changed files with 6 additions and 0 deletions

View file

@ -2,6 +2,7 @@ export const Events = {
COMPONENT_CREATED: "component:created",
COMPONENT_UPDATED: "component:updated",
APP_VIEW_PUBLISHED: "app:view_published",
BLOCK_EJECTED: "block:ejected",
}
export const EventSource = {

View file

@ -1287,6 +1287,11 @@ export const getFrontendStore = () => {
return false
}
// Log event
analytics.captureEvent(Events.BLOCK_EJECTED, {
block: block._component,
})
// Attach block children back into ejected definition, using the
// _containsSlot flag to know where to insert them
const slotContainer = findAllMatchingComponents(