Disable import menu options when project asset storage is not ready
This commit is contained in:
@@ -3610,18 +3610,21 @@ export function App({ store, initialStatusMessage }: AppProps) {
|
|||||||
kind: "action",
|
kind: "action",
|
||||||
label: "3D Model (GLB/GLTF)",
|
label: "3D Model (GLB/GLTF)",
|
||||||
testId: "import-menu-model",
|
testId: "import-menu-model",
|
||||||
|
disabled: !projectAssetStorageReady || projectAssetStorage === null,
|
||||||
onSelect: handleImportModelButtonClick
|
onSelect: handleImportModelButtonClick
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
kind: "action",
|
kind: "action",
|
||||||
label: "Environment",
|
label: "Environment",
|
||||||
testId: "import-menu-environment",
|
testId: "import-menu-environment",
|
||||||
|
disabled: !projectAssetStorageReady || projectAssetStorage === null,
|
||||||
onSelect: handleImportBackgroundImageButtonClick
|
onSelect: handleImportBackgroundImageButtonClick
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
kind: "action",
|
kind: "action",
|
||||||
label: "Audio",
|
label: "Audio",
|
||||||
testId: "import-menu-audio",
|
testId: "import-menu-audio",
|
||||||
|
disabled: !projectAssetStorageReady || projectAssetStorage === null,
|
||||||
onSelect: handleImportAudioButtonClick
|
onSelect: handleImportAudioButtonClick
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user