From 191581e287f78ba325fdd7681c83586309b59df2 Mon Sep 17 00:00:00 2001
From: Hassan Abouelela <hassan@hassanamr.com>
Date: Tue, 19 Jul 2022 13:58:34 +0200
Subject: Simplify Navigation Component

Extract the styles from the navigation component to common styles, and
convert it to a function component.

Signed-off-by: Hassan Abouelela <hassan@hassanamr.com>
---
 src/pages/FormPage/SuccessPage.tsx | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

(limited to 'src/pages/FormPage/SuccessPage.tsx')

diff --git a/src/pages/FormPage/SuccessPage.tsx b/src/pages/FormPage/SuccessPage.tsx
index e35bd4d..e83ca0d 100644
--- a/src/pages/FormPage/SuccessPage.tsx
+++ b/src/pages/FormPage/SuccessPage.tsx
@@ -4,9 +4,7 @@ import {Link} from "react-router-dom";
 
 import {Form} from "../../api/forms";
 import HeaderBar from "../../components/HeaderBar";
-import {unselectable} from "../../commonStyles";
-
-import Navigation from "./Navigation";
+import {returnButtonStyles, navigationStyles, unselectable, mainTextStyles} from "../../commonStyles";
 
 
 interface SuccessProps {
@@ -34,10 +32,10 @@ export default function Success(props: SuccessProps): JSX.Element {
     return (
         <div>
             <HeaderBar title={props.form.name} description={props.form.description}/>
-            <div css={[unselectable, Navigation.containerStyles, divStyle]}>
+            <div css={[unselectable, mainTextStyles, divStyle]}>
                 <h3 css={thanksStyle}>{submitted_text}</h3>
-                <div className={"return_button closed"}>
-                    <Link to="/" css={Navigation.returnStyles}>Return Home</Link>
+                <div css={navigationStyles}>
+                    <Link to="/" css={returnButtonStyles}>Return Home</Link>
                 </div>
             </div>
         </div>
-- 
cgit v1.2.3

