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.

fix ts

Sara Vieirac3703a911540
diff --git a/apps/designer/app/designer/designer.tsx b/apps/designer/app/designer/designer.tsx
index 43b14a34b8..88f510de26 100644
--- a/apps/designer/app/designer/designer.tsx
+++ b/apps/designer/app/designer/designer.tsx
@@ -2,7 +2,7 @@ import { useCallback, useState } from "react";
import { DndProvider } from "react-dnd";
import { TouchBackend } from "react-dnd-touch-backend";
import { useSubscribe, usePublish } from "@webstudio-is/react-sdk";
-import { type Project, type Asset } from "@webstudio-is/prisma-client";
+import { type Project, type AssetWithPath } from "@webstudio-is/prisma-client";
import type { Config } from "~/config";
import type {
HoveredInstanceData,
@@ -173,7 +173,7 @@ const dndOptions = { enableMouseEvents: true };
type DesignerProps = {
config: Config;
project: Project;
- assets: Array<Asset>;
+ assets: Array<AssetWithPath>;
};
export const Designer = ({ config, project, assets }: DesignerProps) => {
diff --git a/apps/designer/app/designer/features/sidebar-left/sidebar-left.tsx b/apps/designer/app/designer/features/sidebar-left/sidebar-left.tsx
index 65b9cd96b8..8879a7fe92 100644
--- a/apps/designer/app/designer/features/sidebar-left/sidebar-left.tsx
+++ b/apps/designer/app/designer/features/sidebar-left/sidebar-left.tsx
@@ -1,6 +1,6 @@
import { useState, useCallback } from "react";
import { useSubscribe, type Publish } from "@webstudio-is/react-sdk";
-import type { Asset } from "@webstudio-is/prisma-client";
+import type { AssetWithPath } from "@webstudio-is/prisma-client";
import {
Box,
SidebarTabs,
@@ -28,7 +28,7 @@ const none = { TabContent: () => null };
type SidebarLeftProps = {
onDragChange: (isDragging: boolean) => void;
publish: Publish;
- assets: Array<Asset>;
+ assets: Array<AssetWithPath>;
};
export const SidebarLeft = ({
diff --git a/apps/designer/app/routes/designer/$id.tsx b/apps/designer/app/routes/designer/$id.tsx
index 50f6f2e296..556f337973 100644
--- a/apps/designer/app/routes/designer/$id.tsx
+++ b/apps/designer/app/routes/designer/$id.tsx
@@ -1,6 +1,6 @@
import { useActionData, useLoaderData } from "@remix-run/react";
import { ActionFunction, LoaderFunction } from "@remix-run/node";
-import type { Project, Asset } from "@webstudio-is/prisma-client";
+import type { Project, AssetWithPath } from "@webstudio-is/prisma-client";
import { Designer, links } from "~/designer";
import * as db from "~/shared/db";
import config from "~/config";
@@ -26,7 +26,7 @@ export const loader: LoaderFunction = async ({ params }) => {
type Data = {
config: typeof config;
project: Project;
- assets: Asset[];
+ assets: AssetWithPath[];
};
type Error = {