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.

use db.projects

Sara Vieira0f334ddc1ada
diff --git a/apps/designer/app/designer/designer.tsx b/apps/designer/app/designer/designer.tsx
index 7c94497ea5..739a340410 100644
--- a/apps/designer/app/designer/designer.tsx
+++ b/apps/designer/app/designer/designer.tsx
@@ -1,6 +1,6 @@
import { useCallback } from "react";
import { useSubscribe, usePublish, type Publish } from "~/shared/pubsub";
-import { type Project } from "@webstudio-is/prisma-client";
+import * as db from "~/shared/db";
import type { Config } from "~/config";
import { Box, Flex, Grid, type CSS } from "@webstudio-is/design-system";
import interStyles from "~/shared/font-faces/inter.css";
@@ -214,7 +214,7 @@ const NavigatorPanel = ({ publish, isPreviewMode }: NavigatorPanelProps) => {
type DesignerProps = {
config: Config;
- project: Project;
+ project: db.project.Project;
};
export const Designer = ({ config, project }: DesignerProps) => {
diff --git a/apps/designer/app/designer/features/topbar/publish.tsx b/apps/designer/app/designer/features/topbar/publish.tsx
index 6ccab30c12..425e26dde9 100644
--- a/apps/designer/app/designer/features/topbar/publish.tsx
+++ b/apps/designer/app/designer/features/topbar/publish.tsx
@@ -1,7 +1,6 @@
import { useState, useEffect } from "react";
import { useFetcher } from "@remix-run/react";
import { RocketIcon, ExternalLinkIcon } from "@webstudio-is/icons";
-import { type Project } from "@webstudio-is/prisma-client";
import {
Button,
Flex,
@@ -16,8 +15,8 @@ import {
} from "@webstudio-is/design-system";
import { useIsPublishDialogOpen } from "../../shared/nano-states";
import env from "~/shared/env";
-
-type PublishButtonProps = { project: Project };
+import * as db from "~/shared/db";
+type PublishButtonProps = { project: db.project.Project };
const getHost = () => {
if (env.PUBLISHER_ENDPOINT && env.PUBLISHER_HOST) {
diff --git a/apps/designer/app/designer/features/topbar/share.tsx b/apps/designer/app/designer/features/topbar/share.tsx
index 6581e792d3..2d926fe111 100644
--- a/apps/designer/app/designer/features/topbar/share.tsx
+++ b/apps/designer/app/designer/features/topbar/share.tsx
@@ -8,10 +8,10 @@ import {
TextField,
} from "@webstudio-is/design-system";
import { Share1Icon } from "@webstudio-is/icons";
-import { type Project } from "@webstudio-is/prisma-client";
+import * as db from "~/shared/db";
import { useIsShareDialogOpen } from "../../shared/nano-states";
-type ShareButtonProps = { path: string; project: Project };
+type ShareButtonProps = { path: string; project: db.project.Project };
const Content = ({ path, project }: ShareButtonProps) => {
if (typeof location === "undefined") {
diff --git a/apps/designer/app/designer/features/topbar/topbar.tsx b/apps/designer/app/designer/features/topbar/topbar.tsx
index 824f7b2568..86bc0c2915 100644
--- a/apps/designer/app/designer/features/topbar/topbar.tsx
+++ b/apps/designer/app/designer/features/topbar/topbar.tsx
@@ -8,11 +8,12 @@ import { PublishButton } from "./publish";
import { SyncStatus } from "./sync-status";
import { Menu } from "./menu";
import { Breakpoints } from "../breakpoints";
+import * as db from "~/shared/db";
type TopbarProps = {
config: Config;
css: CSS;
- project: Project;
+ project: db.project.Project;
publish: Publish;
};
export const Topbar = ({ config, css, project, publish }: TopbarProps) => {
diff --git a/apps/designer/app/routes/designer/$id.tsx b/apps/designer/app/routes/designer/$id.tsx
index f24a850036..1dae33f318 100644
--- a/apps/designer/app/routes/designer/$id.tsx
+++ b/apps/designer/app/routes/designer/$id.tsx
@@ -3,7 +3,6 @@ import { ActionFunction, LoaderFunction } from "@remix-run/node";
import { toast } from "@webstudio-is/design-system";
import { Designer, links } from "~/designer";
import * as db from "~/shared/db";
-import type { Project } from "@webstudio-is/prisma-client";
import config from "~/config";
import env from "~/env.server";
import { uploadAssets } from "~/shared/db/misc.server";
@@ -27,7 +26,7 @@ export const loader: LoaderFunction = async ({ params }) => {
type Data = {
config: typeof config;
- project: Project;
+ project: db.project.Project;
};
type Error = {