Skip to content

Commit

Permalink
Travis npm test
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Lee committed Feb 15, 2018
1 parent 54557b9 commit 1ea2d21
Show file tree
Hide file tree
Showing 6 changed files with 208 additions and 237 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ node_modules/.cache/babel-loader/7c7344043da2878d53f54cb7ca74df74576262bd.json.g
.idea/workspace.xml
.idea/workspace.xml
*.gz
.idea/workspace.xml
379 changes: 167 additions & 212 deletions .idea/workspace.xml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: node_js
node_js:
- "stable"
- 8
cache:
directories:
- node_modules
Expand Down
2 changes: 1 addition & 1 deletion src/App.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import App from './index';

it('renders without crashing', () => {
const div = document.createElement('div');
Expand Down
25 changes: 2 additions & 23 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import App from './structure';
import registerServiceWorker from './registerServiceWorker';
import {
BrowserRouter as Router,
Expand All @@ -10,32 +10,11 @@ import {
Switch
} from 'react-router-dom';

//bodies
import MainPage from './bodies/main'
import NavigationBar from './navbar/navigationBar'
import StudentLanding from './bodies/studentLanding'
import ProfLanding from './bodies/professorLanding'
import AdminLanding from './bodies/adminLanding'

const Redirection=()=>(
<Redirect to={"/main"}/>
);

//<Route path="/app/*" component={MainPage}/>

ReactDOM.render(
<div>
<NavigationBar/>
<Router>
<Switch>
<Route exact path="/main" component={MainPage} />
<Route exact path="/student/*" component={StudentLanding} />
<Route exact path="/prof/*" component={ProfLanding}/>
<Route exact path="/admin/*" component={AdminLanding}/>
<Route path="/*" component={Redirection} />
</Switch>
</Router>

</div>
<App/>
, document.getElementById('root'));
registerServiceWorker();
36 changes: 36 additions & 0 deletions src/structure.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/**
* Created by jaewonlee on 2018. 2. 15..
*/
import React, { Component } from 'react';
//bodies
import MainPage from './bodies/main'
import NavigationBar from './navbar/navigationBar'
import StudentLanding from './bodies/studentLanding'
import ProfLanding from './bodies/professorLanding'
import AdminLanding from './bodies/adminLanding'

const Redirection=()=>(
<Redirect to={"/main"}/>
);

class App extends Component {
render() {
return (
<div>
<NavigationBar/>
<Router>
<Switch>
<Route exact path="/main" component={MainPage} />
<Route exact path="/student/*" component={StudentLanding} />
<Route exact path="/prof/*" component={ProfLanding}/>
<Route exact path="/admin/*" component={AdminLanding}/>
<Route path="/*" component={Redirection} />
</Switch>
</Router>

</div>
);
}
}

export default App;

0 comments on commit 1ea2d21

Please sign in to comment.