Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

ts fix

Sara Vieirab0520eb9048f
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 0a1b836f2a..80db7345aa 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
@@ -15,13 +15,13 @@ export const TabContent = ({
}) => {
const newImages = useActionData();
- const [assets, setAsssets] = useState(baseAssets);
+ const [assets, setAssets] = useState(baseAssets);
useEffect(() => {
if (newImages?.length) {
- setAsssets((currentAssets) => [
+ setAssets((currentAssets) => [
...newImages,
- ...currentAssets.filter((asset) => !("uploading" in asset)),
+ ...currentAssets.filter((asset) => asset.status !== "uploading"),
]);
}
}, [newImages]);
@@ -32,7 +32,7 @@ export const TabContent = ({
<Heading>Assets</Heading>
<AddAnAssetForm
onSubmit={(uploadedAssets: Array<UploadingAsset>) =>
- setAsssets((assets) => [...uploadedAssets, ...assets])
+ setAssets((assets) => [...uploadedAssets, ...assets])
}
/>
</Flex>
diff --git a/packages/prisma-client/src/types.ts b/packages/prisma-client/src/types.ts
index 31a1a8dcc8..fbaabd8d76 100644
--- a/packages/prisma-client/src/types.ts
+++ b/packages/prisma-client/src/types.ts
@@ -4,6 +4,6 @@ export type { InstanceProps, Project, User, Breakpoints } from "@prisma/client";
export type Asset = DbAsset & {
path: string;
- status: "uploading" | "uploaded";
+ status?: "uploading" | "uploaded";
};
export type { DbAsset };