Skip to content

Commit

Permalink
fix(blocks): replace code with @/components/ui imports while copying …
Browse files Browse the repository at this point in the history
…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"
  • Loading branch information
Julien712-dev committed Apr 8, 2024
1 parent be534bf commit e4db390
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/www/lib/blocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ export async function getBlock(

return {
...chunk,
code: sourceFile.getText(),
code: sourceFile
.getText()
.replaceAll(`@/registry/${style}/`, "@/components/"),
}
})
)
Expand Down

0 comments on commit e4db390

Please sign in to comment.