From 15f3fc8296df08a7c729683135e34d62a8301843 Mon Sep 17 00:00:00 2001 From: Danny Piper Date: Tue, 29 Oct 2024 14:43:30 +0000 Subject: [PATCH] feat: added
to oracle text --- frontend/src/app/q/oracle.tsx | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/q/oracle.tsx b/frontend/src/app/q/oracle.tsx index 6534d56..bac5a16 100644 --- a/frontend/src/app/q/oracle.tsx +++ b/frontend/src/app/q/oracle.tsx @@ -1,3 +1,4 @@ +import { ReactNode } from "react"; import Manamoji from "./manamoji"; export default function Oracle(props: { oracle_text: string }) { @@ -7,7 +8,23 @@ export default function Oracle(props: { oracle_text: string }) { {oracle.map((part) => { const mana = part.split("}"); if (mana.length == 1) { - return <>{part}; + return ( + <> + { + (part + .split("\n") + .map((x): ReactNode => <>{x}) + .reduce((a, b) => ( + <> + {a} +
+ {b} + + )), + (<>)) + } + + ); } else { return ( <>