Skip to content

Commit

Permalink
Merge 73852fd into f2b8c18
Browse files Browse the repository at this point in the history
  • Loading branch information
SnyderMbishai committed Jan 22, 2019
2 parents f2b8c18 + 73852fd commit ee01a9e
Show file tree
Hide file tree
Showing 23 changed files with 909 additions and 105 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

# testing
/coverage
*.snap

# production
/build
Expand Down
139 changes: 70 additions & 69 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 12 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,24 @@
"author": "technocrats",
"dependencies": {
"axios": "^0.18.0",
"axios-mock-adapter": "^1.16.0",
"babel-jest": "^23.6.0",
"enzyme": "^3.8.0",
"enzyme-adapter-react-16": "^1.7.1",
"expect": "^23.6.0",
"fetch-mock": "^7.3.0",
"moxios": "^0.4.0",
"nock": "^10.0.6",
"node-fetch": "^2.3.0",
"prop-types": "^15.6.2",
"react": "^16.7.0",
"react-addons-test-utils": "^15.6.2",
"react-dom": "^16.7.0",
"react-redux": "^6.0.0",
"react-router-dom": "^4.3.1",
"react-scripts": "2.1.3",
"react-semantic-toasts": "^0.4.1",
"react-test-renderer": "^16.7.0",
"redux": "^4.0.1",
"redux-devtools-extension": "^2.13.7",
"redux-immutable-state-invariant": "^2.1.0",
Expand All @@ -43,14 +50,17 @@
"not op_mini all"
],
"devDependencies": {
"enzyme": "^3.8.0",
"enzyme-adapter-react-16": "^1.7.1",
"enzyme-to-json": "^3.3.5",
"eslint": "^5.6.0",
"eslint-config-airbnb": "^17.1.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jsx-a11y": "^6.1.2",
"eslint-plugin-react": "^7.12.3",
"react-router": "^4.3.1",
"node-sass": "^4.11.0"
"jest": "^23.6.0",
"node-sass": "^4.11.0",
"react-router": "^4.3.1"
},
"jest": {
"snapshotSerializers": [
Expand Down
18 changes: 8 additions & 10 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,24 @@ import React, { Component } from 'react';
import 'semantic-ui-css/semantic.min.css';
import { BrowserRouter, Route, Switch } from 'react-router-dom';

import RegistrationPage from './components/Authentication/Registration/RegistrationPage';
import Error from './components/ErrorHandlers/MissingPageError';
import Home from './Home';
import ArticleContainer from './components/Articles/ArticlesContainer';
import RegistrationPage from './components/Authentication/Registration/RegistrationPage';


class App extends Component {
render() {
return (
<BrowserRouter>
<div>
<div className="App" />
<React.Fragment>
<BrowserRouter>
<Switch>
{/* exact looks for the exact path,
it prevents the home page from being rendered in all the pages */}
<Route path="/" component={Home} exact />
<Route path="/" component={ArticleContainer} exact />
<Route path="/articles" component={ArticleContainer} exact />
<Route path="/register" component={RegistrationPage} exact />
<Route component={Error} />
</Switch>
</div>
</BrowserRouter>
</BrowserRouter>
</React.Fragment>
);
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/App.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';

jest.mock('react-router-dom');

it('renders without crashing', () => {
const div = document.createElement('div');
ReactDOM.render(<App />, div);
Expand Down
13 changes: 0 additions & 13 deletions src/Home.js

This file was deleted.

Loading

0 comments on commit ee01a9e

Please sign in to comment.