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 the new Select on the Dashboard page

Andrey Okonetchnikovc75178839ffb
diff --git a/app/dashboard/components/card.tsx b/app/dashboard/components/card.tsx
index 71730f8060..4289f5f67b 100644
--- a/app/dashboard/components/card.tsx
+++ b/app/dashboard/components/card.tsx
@@ -31,18 +31,22 @@ export const SelectProjectCard = ({
const handleOpen = () => {
navigate(`${config.designerPath}/${selectedProject}`);
};
+
+ const options = ["", ...projects.map((project) => project.id)];
+
return (
<Card>
<Flex direction="column" gap="2">
<Heading>Select a project</Heading>
<Select
name="project"
- options={projects.map((project) => project.id)}
+ options={options}
onChange={setSelectedProject}
value={selectedProject}
placeholder="Create new project"
getLabel={(option) =>
- projects.find((project) => project.id === option)?.title
+ projects.find((project) => project.id === option)?.title ||
+ "Create new project"
}
/>
{selectedProject === "" ? (