fix(blocks): replace code with @/components/ui imports while copying from lift-mode (#3401)

FIXES : https://x.com/jimmeyer/status/1776487418150981661?s=46

The copy button in lift mode was copying code having imports as "@/registry/.../*.tsx" 

This PR replaces all the imports by "@/components/ui/*.tsx"
This commit is contained in:
Aakash
2024-04-08 22:55:46 +05:30
committed by GitHub
parent 7590fb7636
commit bf0c8b596b

View File

@@ -55,7 +55,9 @@ export async function getBlock(
return {
...chunk,
code: sourceFile.getText(),
code: sourceFile
.getText()
.replaceAll(`@/registry/${style}/`, "@/components/"),
}
})
)