diff --git a/src/components/LineBreakToBrTag.tsx b/src/components/LineBreakToBrTag.tsx new file mode 100644 index 0000000..5aa20b5 --- /dev/null +++ b/src/components/LineBreakToBrTag.tsx @@ -0,0 +1,13 @@ +export default function LinebreakToBrTag({ text }: { text: string }) { + // Must be wrapped in fragment to process react nodes correctly + return ( + <> + {text.split('\n').map((line) => ( + <> + {line} +
+ + ))} + + ); +}