diff --git a/app/_components/AlertMessage.module.scss b/app/_components/AlertMessage.module.scss index 19679be..da4af66 100644 --- a/app/_components/AlertMessage.module.scss +++ b/app/_components/AlertMessage.module.scss @@ -21,4 +21,9 @@ { @include body1Stronger; } + + .message + { + white-space: pre-wrap; + } } diff --git a/app/_components/AlertMessage.tsx b/app/_components/AlertMessage.tsx index d78e754..d2c729f 100644 --- a/app/_components/AlertMessage.tsx +++ b/app/_components/AlertMessage.tsx @@ -26,15 +26,15 @@ const AlertMessage: React.FC = async () => if (!response.ok || !alertText) return null; - const title: string = alertText.split("\n", 1)[0]; - const message: string = alertText.substring(title.length); + const title: string = alertText.split("\n", 1)[0].trim(); + const message: string = alertText.substring(title.length + 1).trim(); return (

{ title }

-

+

);