diff --git a/packages/strapi-admin/admin/src/containers/NotFoundPage/index.js b/packages/strapi-admin/admin/src/containers/NotFoundPage/index.js index a37713e39e..21a0b7033f 100755 --- a/packages/strapi-admin/admin/src/containers/NotFoundPage/index.js +++ b/packages/strapi-admin/admin/src/containers/NotFoundPage/index.js @@ -11,40 +11,18 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { defineMessages, FormattedMessage } from 'react-intl'; -import Button from 'components/Button'; +import NotFound from 'components/NotFound'; -import styles from './styles.scss'; -import messages from './messages.json'; - -defineMessages(messages); - -export default class NotFound extends React.Component { // eslint-disable-line react/prefer-stateless-function +export default class NotFoundPage extends React.Component { // eslint-disable-line react/prefer-stateless-function render() { return ( -
-

- 404 -

-

- -

-
+ ); } } -NotFound.propTypes = { +NotFoundPage.propTypes = { history: PropTypes.shape({ goBack: PropTypes.func.isRequired, }).isRequired, diff --git a/packages/strapi-helper-plugin/lib/src/components/NotFound/index.js b/packages/strapi-helper-plugin/lib/src/components/NotFound/index.js new file mode 100644 index 0000000000..a86cfa9518 --- /dev/null +++ b/packages/strapi-helper-plugin/lib/src/components/NotFound/index.js @@ -0,0 +1,36 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { FormattedMessage } from 'react-intl'; +import Button from 'components/Button'; + +import styles from './styles.scss'; + +function NotFound({ history }) { + return ( +
+

+ 404 +

+

+ +

+
+ ); +} + +NotFound.propTypes = { + history: PropTypes.shape({ + goBack: PropTypes.func, + }).isRequired, +} + +export default NotFound; diff --git a/packages/strapi-helper-plugin/lib/src/components/NotFound/styles.scss b/packages/strapi-helper-plugin/lib/src/components/NotFound/styles.scss new file mode 100644 index 0000000000..848f188e83 --- /dev/null +++ b/packages/strapi-helper-plugin/lib/src/components/NotFound/styles.scss @@ -0,0 +1,27 @@ +.notFound { /* stylelint-ignore */ + display: -webkit-flex; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding-top: 114px; + + h1{ + margin-bottom: 12px; + text-shadow: 0 1rem 4rem rgba(255, 255, 255, 0.8); + color: #2C3138; + font-size: 6.4rem; + letter-spacing: 2px; + } + + h2{ + color: #2C3138; + font-size: 1.4rem; + font-weight: 400; + margin-bottom: 50px; + } + + button{ + margin: 0; + } +} diff --git a/packages/strapi-plugin-content-type-builder/admin/src/containers/App/index.js b/packages/strapi-plugin-content-type-builder/admin/src/containers/App/index.js index 5a3a266441..042511b6e7 100755 --- a/packages/strapi-plugin-content-type-builder/admin/src/containers/App/index.js +++ b/packages/strapi-plugin-content-type-builder/admin/src/containers/App/index.js @@ -16,6 +16,7 @@ import { pluginId } from 'app'; import HomePage from 'containers/HomePage'; import ModelPage from 'containers/ModelPage'; +import NotFoundPage from 'containers/NotFoundPage'; import formSaga from 'containers/Form/sagas'; import formReducer from 'containers/Form/reducer'; @@ -54,6 +55,7 @@ class App extends React.Component { + ); diff --git a/packages/strapi-plugin-content-type-builder/admin/src/containers/NotFoundPage/index.js b/packages/strapi-plugin-content-type-builder/admin/src/containers/NotFoundPage/index.js index 81a6f57e9a..8ca6fd2190 100755 --- a/packages/strapi-plugin-content-type-builder/admin/src/containers/NotFoundPage/index.js +++ b/packages/strapi-plugin-content-type-builder/admin/src/containers/NotFoundPage/index.js @@ -10,20 +10,11 @@ */ import React from 'react'; -import { FormattedMessage } from 'react-intl'; -import messages from './messages'; +import NotFound from 'components/NotFound'; -export default class NotFound extends React.Component { +export default class NotFoundPage extends React.Component { render() { - return ( -
-
-

- -

-
-
- ); + return ; } } diff --git a/packages/strapi-plugin-content-type-builder/admin/src/containers/NotFoundPage/messages.js b/packages/strapi-plugin-content-type-builder/admin/src/containers/NotFoundPage/messages.js deleted file mode 100755 index 95ee68f9d2..0000000000 --- a/packages/strapi-plugin-content-type-builder/admin/src/containers/NotFoundPage/messages.js +++ /dev/null @@ -1,13 +0,0 @@ -/* - * NotFoundPage Messages - * - * This contains all the text for the NotFoundPage component. - */ -import { defineMessages } from 'react-intl'; - -export default defineMessages({ - pageNotFound: { - id: 'app.components.NotFoundPage.pageNotFound', - defaultMessage: 'Page not found.', - }, -});