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.

better variable names

Sara Vieirad02cfeea44b8
diff --git a/app/routes/rest/project/clone.$domain.ts b/app/routes/rest/project/clone.$domain.ts
index 637d5d85d6..d2a7ad2465 100644
--- a/app/routes/rest/project/clone.$domain.ts
+++ b/app/routes/rest/project/clone.$domain.ts
@@ -10,13 +10,13 @@ import { createDemoUser } from "~/shared/db/user.server";
const ensureProject = async ({
userId,
domain,
- demoUserId,
+ isDemoUser,
}: {
userId: User["id"];
domain: string;
- demoUserId: boolean;
+ isDemoUser: boolean;
}): Promise<Project> => {
- if (demoUserId) {
+ if (isDemoUser) {
await createDemoUser(userId);
}
const projects = await db.project.loadManyByUserId(userId);
@@ -41,7 +41,7 @@ export const loader: LoaderFunction = async ({ request, params }) => {
const project = await ensureProject({
userId: user ? user.id : generatedUserId,
domain: params.domain,
- demoUserId: user?.id === undefined,
+ isDemoUser: user?.id === undefined,
});
return redirect(`${config.designerPath}/${project?.id}`, { headers });
} catch (error: unknown) {