[fix] cleanup

This commit is contained in:
Arjan Singh
2025-09-17 16:35:18 -07:00
parent ecc3aaa0d1
commit 13c82c72da
5 changed files with 33 additions and 27 deletions

View File

@@ -27,8 +27,8 @@ export const useAssetBrowserDialog = () => {
async function show(props: AssetBrowserDialogProps) {
const handleAssetSelected = (assetPath: string) => {
hide() // Auto-close on selection before async operations
props.onAssetSelected?.(assetPath)
hide() // Auto-close on selection
}
const handleClose = () => {
@@ -39,7 +39,7 @@ export const useAssetBrowserDialog = () => {
const dialogComponentProps = {
headless: true,
modal: true,
closable: false,
closable: true,
pt: {
root: {
class: 'rounded-2xl overflow-hidden'
@@ -58,7 +58,11 @@ export const useAssetBrowserDialog = () => {
try {
assets = await assetService.getAssetsForNodeType(props.nodeType)
} catch (error) {
console.error('Failed to fetch assets for node type:', props.nodeType, error)
console.error(
'Failed to fetch assets for node type:',
props.nodeType,
error
)
}
dialogStore.showDialog({