ErrorPage.tsx 821 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import React, { FC, FunctionComponent } from 'react'
import styled from 'styled-components'
import { PageMarginLeftRight } from '../../style/PageMarginLeftRight'
import { distance } from '../../style/sizes'
import { Link } from 'react-router-dom'

export const ErrorPage: FunctionComponent = () => {
    return <ErrorPageTemplate message={'Sorry, the requested page was not found or could not be accessed :|'}/>
}

const ErrorPageTemplate: FC<{ message: string }> = ({message}) => {
    return (
        <PageMarginLeftRight>
            <StyledRow>
                <h2>{message}</h2>
            </StyledRow>
            <StyledRow>
                <Link to="/">Return to Landing Page</Link>
            </StyledRow>
        </PageMarginLeftRight>
    )
}

const StyledRow = styled.div`
    padding: ${distance.large};
`