diff --git a/packages/ui/src/components/editor/panels/Scenes/container/index.tsx b/packages/ui/src/components/editor/panels/Scenes/container/index.tsx index c1a12d25cd..3f5986b28b 100644 --- a/packages/ui/src/components/editor/panels/Scenes/container/index.tsx +++ b/packages/ui/src/components/editor/panels/Scenes/container/index.tsx @@ -50,12 +50,16 @@ export default function ScenesPanel() { const contextMenuRef = useRef(null) const isContextMenuOpen = useHookstate('') const scenesLoading = scenesQuery.status === 'pending' - const onCreateScene = async () => onNewScene() - const onClickScene = (scene: AssetType) => { - getMutableState(EditorState).scenePath.set(scene.assetURL) + const isCreatingScene = useHookstate(false) + const handleCreateScene = async () => { + isCreatingScene.set(true) + await onNewScene() + isCreatingScene.set(false) } + const onClickScene = (scene: AssetType) => getMutableState(EditorState).scenePath.set(scene.assetURL) + const deleteSelectedScene = async (scene: AssetType) => { if (scene) { await deleteScene(scene.id) @@ -77,11 +81,13 @@ export default function ScenesPanel() {