From 341a9a4d124aed9dd4fa194bf53671ed82a5a8d5 Mon Sep 17 00:00:00 2001 From: Ephraim Duncan <55143799+ephraimduncan@users.noreply.github.com> Date: Sun, 23 Jun 2024 15:11:39 +0000 Subject: [PATCH] fix: copy correct code (#85) --- .../(main)/onboarding/form/code-example-step.tsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/apps/web/src/app/(main)/onboarding/form/code-example-step.tsx b/apps/web/src/app/(main)/onboarding/form/code-example-step.tsx index fb54e26..1efe734 100644 --- a/apps/web/src/app/(main)/onboarding/form/code-example-step.tsx +++ b/apps/web/src/app/(main)/onboarding/form/code-example-step.tsx @@ -16,7 +16,7 @@ type CodeExampleStepProps = { }; export const CodeExampleStep = async ({ formId }: CodeExampleStepProps) => { - const htmlCode = await highlightCode(`
@@ -25,10 +25,9 @@ export const CodeExampleStep = async ({ formId }: CodeExampleStepProps) => { -
`); +`; - const reactCode = - await highlightCode(`export default function FormbaseForm() { + const rawReactCode = `export default function FormbaseForm() { return (
{
); - }`); + }`; + + const htmlCode = await highlightCode(rawHtmlCode); + const reactCode = await highlightCode(rawReactCode); return (
{ }} /> @@ -80,7 +82,7 @@ export const CodeExampleStep = async ({ formId }: CodeExampleStepProps) => { }} />