diff --git a/src/FullScreenView.jsx b/src/FullScreenView.jsx index f207e5c..fc25286 100644 --- a/src/FullScreenView.jsx +++ b/src/FullScreenView.jsx @@ -1,9 +1,9 @@ -import React, { useEffect } from "react"; -import { Link, useLocation } from "react-router-dom"; -import { ErrorMessage } from "./Input"; +import React, { useCallback, useEffect } from "react"; +import { useLocation } from "react-router-dom"; import styles from "./FullScreenView.module.css"; import { Header, HeaderLogo, LeftNav, RightNav } from "./Header"; import classNames from "classnames"; +import { LinkButton, Button } from "./button"; export function FullScreenView({ className, children }) { return ( @@ -28,14 +28,32 @@ export function ErrorView({ error }) { console.error(error); }, [error]); + const onReload = useCallback(() => { + window.location = "/"; + }, []); + return (

Error

- {error.message} - {location.pathname !== "/" && ( - +

{error.message}

+ {location.pathname === "/" ? ( + + ) : ( + + Return to home screen + )}
); diff --git a/src/FullScreenView.module.css b/src/FullScreenView.module.css index ed26e34..f30d9f6 100644 --- a/src/FullScreenView.module.css +++ b/src/FullScreenView.module.css @@ -37,15 +37,5 @@ } .homeLink { - display: flex; - justify-content: center; - align-items: center; - padding: 8px 136px; - color: #0dbd8b; - text-decoration: none; - background: #0dbd8b; - border-radius: 8px; - color: #ffffff; - font-weight: normal; - font-size: 15px; + width: 291px; }