Skip to content

Commit

Permalink
feat: added <br> to oracle text
Browse files Browse the repository at this point in the history
  • Loading branch information
djpiper28 committed Oct 29, 2024
1 parent 1956a41 commit 15f3fc8
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion frontend/src/app/q/oracle.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { ReactNode } from "react";
import Manamoji from "./manamoji";

export default function Oracle(props: { oracle_text: string }) {
Expand All @@ -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}
<br />
{b}
</>
)),
(<></>))
}
</>
);
} else {
return (
<>
Expand Down

0 comments on commit 15f3fc8

Please sign in to comment.