From bf0c8b596bd7fb32daed989cab318430fd4c8919 Mon Sep 17 00:00:00 2001 From: Aakash <86520455+aakash19here@users.noreply.github.com> Date: Mon, 8 Apr 2024 22:55:46 +0530 Subject: [PATCH] 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" --- apps/www/lib/blocks.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/www/lib/blocks.ts b/apps/www/lib/blocks.ts index 520cbd6f49..dd44e976f4 100644 --- a/apps/www/lib/blocks.ts +++ b/apps/www/lib/blocks.ts @@ -55,7 +55,9 @@ export async function getBlock( return { ...chunk, - code: sourceFile.getText(), + code: sourceFile + .getText() + .replaceAll(`@/registry/${style}/`, "@/components/"), } }) )