From 25c6a154139d7337b7fdeae428bd5a9e8658168d Mon Sep 17 00:00:00 2001 From: Teriuihi Date: Sun, 11 Aug 2024 19:01:00 +0200 Subject: [PATCH] Handle single-line and multi-line email verification messages Previously, multi-line messages were parsed for line breaks while single-line messages were not appropriately handled. This update checks if the value contains line breaks and processes it accordingly, ensuring both single-line and multi-line messages are displayed correctly. --- src/components/verify_email/thank_you.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/verify_email/thank_you.tsx b/src/components/verify_email/thank_you.tsx index 8b84501..53740de 100644 --- a/src/components/verify_email/thank_you.tsx +++ b/src/components/verify_email/thank_you.tsx @@ -30,10 +30,12 @@ const ThankYou: FC = () => {

{key}

{ - value - .split("\n") - .filter(str => str.trim() !== "") - .map((str, index) =>

{str}

) + value.includes("\n") ? + value + .split("\n") + .filter(str => str.trim() !== "") + .map((str, index) =>

{str}

) + :

{value}

}
))}