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.

more pr fixes

Sara Vieirad1b4e9fa85b6
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 57269236ec..34341be7c7 100644
--- a/apps/designer/app/designer/features/sidebar-left/sidebar-left.tsx
+++ b/apps/designer/app/designer/features/sidebar-left/sidebar-left.tsx
@@ -1,5 +1,9 @@
import { useState, useCallback } from "react";
-import { useSubscribe, type Publish } from "@webstudio-is/react-sdk";
+import {
+ useSubscribe,
+ type Publish,
+ type Asset,
+} from "@webstudio-is/react-sdk";
import {
Box,
SidebarTabs,
@@ -10,7 +14,6 @@ import {
import { useSelectedInstanceData } from "../../shared/nano-states";
import { panels } from "./panels";
import type { TabName } from "./types";
-import { Asset } from "@prisma/client";
import { isFeatureEnabled } from "~/shared/feature-flags";
const sidebarTabsContentStyle = {
@@ -62,7 +65,7 @@ export const SidebarLeft = ({
[onDragChange]
);
- const panelsToMap = (
+ const enabledPanels = (
isFeatureEnabled("assets")
? Object.keys(panels)
: Object.keys(panels).filter((panel) => panel !== "imageUpload")
@@ -72,7 +75,7 @@ export const SidebarLeft = ({
<Box css={{ position: "relative", zIndex: 1 }}>
<SidebarTabs activationMode="manual" value={activeTab}>
<SidebarTabsList>
- {panelsToMap.map((tabName: TabName) => (
+ {enabledPanels.map((tabName: TabName) => (
<SidebarTabsTrigger
aria-label={tabName}
key={tabName}
diff --git a/apps/designer/app/routes/designer/$id.tsx b/apps/designer/app/routes/designer/$id.tsx
index 35f561af53..3b91829e6f 100644
--- a/apps/designer/app/routes/designer/$id.tsx
+++ b/apps/designer/app/routes/designer/$id.tsx
@@ -5,12 +5,12 @@ import {
unstable_createFileUploadHandler,
unstable_parseMultipartFormData,
} from "@remix-run/node";
-import type { Project } from "@webstudio-is/react-sdk";
+import type { Project, Asset } from "@webstudio-is/react-sdk";
import { Designer, links } from "~/designer";
import * as db from "~/shared/db";
import config from "~/config";
import env from "~/env.server";
-import { type Asset } from "@webstudio-is/react-sdk";
+
export { links };
export const loader: LoaderFunction = async ({ params }) => {