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.
This commit is contained in:
parent
821e63953b
commit
25c6a15413
|
|
@ -30,10 +30,12 @@ const ThankYou: FC = () => {
|
||||||
<div>
|
<div>
|
||||||
<p><strong>{key}</strong></p>
|
<p><strong>{key}</strong></p>
|
||||||
{
|
{
|
||||||
value
|
value.includes("\n") ?
|
||||||
.split("\n")
|
value
|
||||||
.filter(str => str.trim() !== "")
|
.split("\n")
|
||||||
.map((str, index) => <p style={{ wordWrap: 'break-word' }}>{str}</p>)
|
.filter(str => str.trim() !== "")
|
||||||
|
.map((str, index) => <p style={{ wordWrap: 'break-word' }} key={index}>{str}</p>)
|
||||||
|
: <p style={{ wordWrap: 'break-word' }}>{value}</p>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user