From ee42c83e39ef2a5bc939b6a0b9e3e562e30f278f Mon Sep 17 00:00:00 2001 From: borisvida Date: Tue, 15 Nov 2016 15:31:08 +0100 Subject: [PATCH] add About page --- .editorconfig | 2 +- app/components/About/index.js | 17 +++++++++++++++++ app/components/About/messages.js | 14 ++++++++++++++ app/components/About/tests/index.test.js | 11 +++++++++++ app/routes.js | 8 ++++++++ 5 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 app/components/About/index.js create mode 100644 app/components/About/messages.js create mode 100644 app/components/About/tests/index.test.js diff --git a/.editorconfig b/.editorconfig index d4eed84..c36c676 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,7 +1,7 @@ root = true [*] -end_of_line = lf +end_of_line = crlf insert_final_newline = false indent_style = space indent_size = 2 diff --git a/app/components/About/index.js b/app/components/About/index.js new file mode 100644 index 0000000..210b9ad --- /dev/null +++ b/app/components/About/index.js @@ -0,0 +1,17 @@ +/* eslint linebreak-style: ["error", "windows"]*/ + +import React from 'react'; + +import { FormattedMessage } from 'react-intl'; +import messages from './messages'; + + +function About() { + return ( +
+ +
+ ); +} + +export default About; diff --git a/app/components/About/messages.js b/app/components/About/messages.js new file mode 100644 index 0000000..b828867 --- /dev/null +++ b/app/components/About/messages.js @@ -0,0 +1,14 @@ +/* eslint linebreak-style: ["error", "windows"]*/ +/* + * About Messages + * + * This contains all the text for the About component. + */ +import { defineMessages } from 'react-intl'; + +export default defineMessages({ + header: { + id: 'app.components.About.header', + defaultMessage: 'This is the About component !', + }, +}); diff --git a/app/components/About/tests/index.test.js b/app/components/About/tests/index.test.js new file mode 100644 index 0000000..2d91884 --- /dev/null +++ b/app/components/About/tests/index.test.js @@ -0,0 +1,11 @@ +// import About from '../index'; + +import expect from 'expect'; +// import { shallow } from 'enzyme'; +// import React from 'react'; + +describe('', () => { + it('Expect to have unit tests specified', () => { + expect(true).toEqual(false); + }); +}); diff --git a/app/routes.js b/app/routes.js index 41fc13e..7179f27 100644 --- a/app/routes.js +++ b/app/routes.js @@ -33,6 +33,14 @@ export default function createRoutes(store) { importModules.catch(errorLoading); }, + }, { + path: '/about', + name: 'about', + getComponent(location, cb) { + System.import('components/About') + .then(loadModule(cb)) + .catch(errorLoading); + }, }, { path: '*', name: 'notfound',