diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/pages/FormPage.tsx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/pages/FormPage.tsx b/src/pages/FormPage.tsx index 8852ac5..d7dfd4b 100644 --- a/src/pages/FormPage.tsx +++ b/src/pages/FormPage.tsx @@ -159,11 +159,20 @@ function FormPage(): JSX.Element { if (form && sent) { const thanksStyle = css`font-family: "Uni Sans", "Hind", "Arial", sans-serif; margin-top: 15.5rem;`; const divStyle = css`width: 80%;`; + + let submitted_text; + if (form.submitted_text) { + submitted_text = form.submitted_text.split("\n").map((line, index) => <span key={index}>{line}<br/></span>); + submitted_text.push(<span key={submitted_text.length - 1}>{submitted_text.pop()?.props.children[0]}</span>); + } else { + submitted_text = "Thanks for your response!"; + } + return ( <div> <HeaderBar title={form.name} description={form.description}/> <div css={[unselectable, Navigation.containerStyles, divStyle]}> - <h3 css={thanksStyle}>{form.submitted_text ?? "Thanks for your response!"}</h3> + <h3 css={thanksStyle}>{submitted_text}</h3> <div className={ "return_button closed" }> <Link to="/" css={Navigation.returnStyles}>Return Home</Link> </div> |