From 048c5ddb307654ec2f35aed52cb6f34c59313e6c Mon Sep 17 00:00:00 2001 From: Sara Vieira Date: Tue, 26 Jul 2022 18:31:36 +0200 Subject: [PATCH] small renames --- .../sidebar-left/panels/asset-manager.tsx | 4 +- .../sidebar-left/panels/components/image.tsx | 54 ++++++++++--------- 2 files changed, 30 insertions(+), 28 deletions(-) diff --git a/apps/designer/app/designer/features/sidebar-left/panels/asset-manager.tsx b/apps/designer/app/designer/features/sidebar-left/panels/asset-manager.tsx index 483c0f413e..75105ca579 100644 --- a/apps/designer/app/designer/features/sidebar-left/panels/asset-manager.tsx +++ b/apps/designer/app/designer/features/sidebar-left/panels/asset-manager.tsx @@ -16,9 +16,9 @@ export const useAssetsState = (baseAssets: Array) => { const [assets, setAssets] = useState(baseAssets); useEffect(() => { - if (imageChanges?.uploadAssets?.length) { + if (imageChanges?.uploadedAssets?.length) { setAssets((currentAssets) => [ - ...imageChanges.uploadAsset, + ...imageChanges.uploadedAssets, ...currentAssets.filter((asset) => asset.status !== "uploading"), ]); } diff --git a/apps/designer/app/designer/features/sidebar-left/panels/components/image.tsx b/apps/designer/app/designer/features/sidebar-left/panels/components/image.tsx index 1a270b9c65..84bf91b0eb 100644 --- a/apps/designer/app/designer/features/sidebar-left/panels/components/image.tsx +++ b/apps/designer/app/designer/features/sidebar-left/panels/components/image.tsx @@ -83,33 +83,35 @@ export const AssetManagerImage = ({ ...(isUploading ? { filter: "blur(1px)", opacity: 0.7 } : {}), }} > - - Are you sure you want to delete this asset? - - - } - > - + + } > - - - + + + )} {isUploading && (