diff --git a/packages/builder/src/builderStore/index.js b/packages/builder/src/builderStore/index.js index dfb8609e65..eecccab7a6 100644 --- a/packages/builder/src/builderStore/index.js +++ b/packages/builder/src/builderStore/index.js @@ -63,9 +63,9 @@ export const selectedComponent = derived( ([$store, $selectedScreen]) => { if ( $selectedScreen && - ["navigation", "screen"].includes($store.selectedComponentId) + $store.selectedComponentId?.startsWith(`${$selectedScreen._id}-`) ) { - return findComponent($selectedScreen?.props, $selectedScreen?.props._id) + return $selectedScreen?.props } if (!$selectedScreen || !$store.selectedComponentId) { return null diff --git a/packages/builder/src/builderStore/store/frontend.js b/packages/builder/src/builderStore/store/frontend.js index 9c52a52b47..8f4f6cc2c4 100644 --- a/packages/builder/src/builderStore/store/frontend.js +++ b/packages/builder/src/builderStore/store/frontend.js @@ -1002,7 +1002,6 @@ export const getFrontendStore = () => { // Check for screen and navigation component edge cases const screenComponentId = `${screen._id}-screen` const navComponentId = `${screen._id}-navigation` - console.log(componentId, screenComponentId, navComponentId) if (componentId === screenComponentId) { return null } @@ -1083,7 +1082,6 @@ export const getFrontendStore = () => { } }, selectPrevious: () => { - console.log("prev") const previousId = store.actions.components.getPrevious() if (previousId) { store.update(state => { @@ -1093,7 +1091,6 @@ export const getFrontendStore = () => { } }, selectNext: () => { - console.log("next") const nextId = store.actions.components.getNext() if (nextId) { store.update(state => {