diff --git a/app/actions/actionTypes.js b/app/actions/actionTypes.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/app/actions/index.js b/app/actions/index.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/app/assets/index.html b/app/assets/index.html index 6b8cac71c26358cbe3e2449b20520a21d7891763..d5bf87ac5aab47bc90553981507e519af4246c4b 100644 --- a/app/assets/index.html +++ b/app/assets/index.html @@ -2,15 +2,11 @@ <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width" /> - <title>Brunch</title> + <title>Long Route</title> <link rel="stylesheet" href="/app.css" /> <script src="/app.js"></script> <script>require('initialize');</script> </head> <body> - <div class="brunch"> - <a href="http://brunch.io"><img src="http://brunch.io/images/logo.png" alt="Brunch"></a> - <p>Bon Appétit.</p> - <div id="app"></div> - </div> + <div id="app"></div> </body> diff --git a/app/components/App.jsx b/app/components/App.jsx index 2ca0c1a051d3941802ffc6c5b5198e87887c9ab2..79466717fda68d52f22d6b805d51a0674a6cee5f 100644 --- a/app/components/App.jsx +++ b/app/components/App.jsx @@ -1,13 +1,7 @@ import React from 'react'; -import Counter from './Counter'; export default class App extends React.Component { render() { - const widget = ( - <div id="content"> - <Counter /> - </div> - ); - return widget; + return (<p>Hello</p>) } } diff --git a/app/components/Counter.jsx b/app/components/Counter.jsx deleted file mode 100644 index cc011eeee3891ed6ee4035a1c4630f12f37d0a54..0000000000000000000000000000000000000000 --- a/app/components/Counter.jsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import { connect } from 'react-redux'; - -const BaseCounter = ({ count, onPlusClick, onMinusClick }) => ( - <div> - <h5><a href="https://redux.js.org/">Redux</a> & <a href="https://facebook.github.io/react/">React</a> Counter</h5> - <p> - <button onClick={onMinusClick}>-</button> - {count} - <button onClick={onPlusClick}>+</button> - </p> - </div> -); - -BaseCounter.propTypes = { - count: PropTypes.number.isRequired, - onPlusClick: PropTypes.func.isRequired, - onMinusClick: PropTypes.func.isRequired, -}; - -const mapStateToProps = state => ({ count: state }); - -const mapDispatchToProps = dispatch => ({ - onPlusClick: () => dispatch({ type: 'INCREMENT' }), - onMinusClick: () => dispatch({ type: 'DECREMENT' }), -}); - -export default connect(mapStateToProps, mapDispatchToProps)(BaseCounter); diff --git a/app/initialize.jsx b/app/initialize.jsx index 4b0dd456ff1671cad984cc811df95f9c15142a6e..63fa3e54bbd4f05f1d1ffb3a7957f8385669439f 100644 --- a/app/initialize.jsx +++ b/app/initialize.jsx @@ -2,29 +2,16 @@ import ReactDOM from 'react-dom'; import React from 'react'; import { Provider } from 'react-redux'; import { createStore } from 'redux'; -import counterApp from './reducers'; import App from './components/App'; -const store = createStore(counterApp, module.hot && module.hot.data && (module.hot.data.counter || 0)); - -if (module.hot) { - module.hot.accept('./reducers', () => { - store.replaceReducer(require('./reducers').default); // eslint-disable-line - }); - module.hot.accept(); - - module.hot.dispose((data) => { - data.counter = store.getState(); // eslint-disable-line - [].slice.apply(document.querySelector('#app').children).forEach(c => c.remove()); - }); -} +// const store = createStore(counterApp, module.hot && module.hot.data && (module.hot.data.counter || 0)); const load = () => { ReactDOM.render( - <Provider store={store}> + //<Provider store={store}> <App /> - </Provider>, - document.querySelector('#app') + //</Provider> + , document.querySelector('#app') ); }; diff --git a/app/reducers.js b/app/reducers.js deleted file mode 100644 index 410cfb915abb88c56e379a72af5325900f8abb48..0000000000000000000000000000000000000000 --- a/app/reducers.js +++ /dev/null @@ -1,10 +0,0 @@ -export default (state = 0, action) => { - switch (action.type) { - case 'INCREMENT': - return state + 1; - case 'DECREMENT': - return state - 1; - default: - return state; - } -}; diff --git a/app/reducers/index.js b/app/reducers/index.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/app/styles/application.css b/app/styles/application.css index efa58d968f99729d3269ede3e89fc952372cb026..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 --- a/app/styles/application.css +++ b/app/styles/application.css @@ -1,20 +0,0 @@ -.brunch { - font-family: -apple-system, Sans-Serif; - text-align: center; - font-size: 24pt; - color: #3f894a; -} - -a { - color: #3f894a; - text-decoration: none; - border-bottom: 1px solid rgba(0, 0, 0, 0); -} - -a:hover { - color: #27552e; -} - -h5 > a { - text-decoration: underline; -}