From ea677cc74eb0b35591e06558af80cfce2c5b926b Mon Sep 17 00:00:00 2001 From: shadcn Date: Tue, 17 Dec 2024 23:14:59 +0400 Subject: [PATCH] fix: open in v0 --- apps/www/actions/edit-in-v0.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/www/actions/edit-in-v0.ts b/apps/www/actions/edit-in-v0.ts index fa15bb69cb0..ca10b126541 100644 --- a/apps/www/actions/edit-in-v0.ts +++ b/apps/www/actions/edit-in-v0.ts @@ -34,6 +34,9 @@ export async function editInV0({ // Remove v0 prefix from the name registryItem.name = registryItem.name.replace(/^v0-/, "") + const projectName = capitalCase(name.replace(/\d+/g, "")) + registryItem.description = registryItem.description || projectName + // Replace `@/registry/new-york/` in files. registryItem.files = registryItem.files?.map((file) => { if (file.content?.includes("@/registry/new-york/ui")) { @@ -53,7 +56,7 @@ export async function editInV0({ url, }, meta: { - project: capitalCase(name.replace(/\d+/g, "")), + project: projectName, file: `${name}.tsx`, }, }