mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-06-11 09:51:40 +00:00
fix: open in v0
This commit is contained in:
@@ -34,6 +34,9 @@ export async function editInV0({
|
|||||||
// Remove v0 prefix from the name
|
// Remove v0 prefix from the name
|
||||||
registryItem.name = registryItem.name.replace(/^v0-/, "")
|
registryItem.name = registryItem.name.replace(/^v0-/, "")
|
||||||
|
|
||||||
|
const projectName = capitalCase(name.replace(/\d+/g, ""))
|
||||||
|
registryItem.description = registryItem.description || projectName
|
||||||
|
|
||||||
// Replace `@/registry/new-york/` in files.
|
// Replace `@/registry/new-york/` in files.
|
||||||
registryItem.files = registryItem.files?.map((file) => {
|
registryItem.files = registryItem.files?.map((file) => {
|
||||||
if (file.content?.includes("@/registry/new-york/ui")) {
|
if (file.content?.includes("@/registry/new-york/ui")) {
|
||||||
@@ -53,7 +56,7 @@ export async function editInV0({
|
|||||||
url,
|
url,
|
||||||
},
|
},
|
||||||
meta: {
|
meta: {
|
||||||
project: capitalCase(name.replace(/\d+/g, "")),
|
project: projectName,
|
||||||
file: `${name}.tsx`,
|
file: `${name}.tsx`,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user