summaryrefslogtreecommitdiffstats
path: root/front/odiparpack/app/containers/NotFound/NotFound.js
blob: 4662a065f1752f728078763d3530f1080fc730cc (plain)
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
27
28
29
30
31
32
33
import React from 'react';
import { Helmet } from 'react-helmet';
import brand from 'ba-api/brand';
import { Route } from 'react-router-dom';
import { ErrorWrap } from 'ba-components';

const title = brand.name + ' - Page Not Found';
const description = brand.desc;

const NotFound = () => (
  <Route
    render={({ staticContext }) => {
      if (staticContext) {
        staticContext.status = 404; // eslint-disable-line
      }
      return (
        <div>
          <Helmet>
            <title>{title}</title>
            <meta name="description" content={description} />
            <meta property="og:title" content={title} />
            <meta property="og:description" content={description} />
            <meta property="twitter:title" content={title} />
            <meta property="twitter:description" content={description} />
          </Helmet>
          <ErrorWrap title="404" desc="Oops, Page Not Found :(" />
        </div>
      );
    }}
  />
);

export default NotFound;