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.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
rename projectId -> projectIdObject
Roman Pominovac4ff9d46533
diff --git a/apps/designer/app/routes/$.tsx b/apps/designer/app/routes/$.tsxindex 50b130a72e..9cd16a0dfc 100644--- a/apps/designer/app/routes/$.tsx+++ b/apps/designer/app/routes/$.tsx@@ -20,7 +20,7 @@ type ProjectIdentifier = { type: "id" | "domain"; value: string };export const getCanvasRequestParams = (request: Request):- | { projectId: ProjectIdentifier; mode: Mode; pathname: string }+ | { projectIdObject: ProjectIdentifier; mode: Mode; pathname: string }| undefined => {const url = new URL(request.url);@@ -30,7 +30,7 @@ export const getCanvasRequestParams = (return undefined;}- let projectId: ProjectIdentifier | undefined = undefined;+ let projectIdObject: ProjectIdentifier | undefined = undefined;// @todo all this subdomain logic is very hackyconst host =@@ -39,31 +39,31 @@ export const getCanvasRequestParams = ("";const [userDomain, wstdDomain] = host.split(".");if (wstdDomain === "wstd" || wstdDomain?.includes("localhost")) {- projectId = { type: "domain", value: userDomain };+ projectIdObject = { type: "domain", value: userDomain };}- if (projectId === undefined) {+ if (projectIdObject === undefined) {const projectIdParam = url.searchParams.get("projectId");if (projectIdParam !== null) {- projectId = { type: "id", value: projectIdParam };+ projectIdObject = { type: "id", value: projectIdParam };}}- if (projectId === undefined) {+ if (projectIdObject === undefined) {return undefined;}const modeParam = url.searchParams.get("mode");if (modeParam === "edit") {- return { projectId, mode: "edit", pathname };+ return { projectIdObject, mode: "edit", pathname };}if (modeParam === "preview") {- return { projectId, mode: "preview", pathname };+ return { projectIdObject, mode: "preview", pathname };}- return { projectId, mode: "published", pathname };+ return { projectIdObject, mode: "published", pathname };};export const meta: MetaFunction = ({ data }: { data: Data }) => {