-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* WIP * update test, don't change history for hash change
- Loading branch information
1 parent
c9894e8
commit 5f504f1
Showing
14 changed files
with
1,555 additions
and
2,094 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
import React from 'react'; | ||
import { Link } from './../../src/router.js'; | ||
import React from "react"; | ||
import { Link } from "./../../src/router.js"; | ||
|
||
const Home = (props) => { | ||
return ( | ||
const Home = props => ( | ||
<div> | ||
<h1>Home</h1> | ||
<div> | ||
<h1>Home</h1> | ||
<div>Render Mode: {props.page.mode}</div> | ||
<div> | ||
<Link to="/about">About</Link> | ||
</div> | ||
<div> | ||
<Link to="/x">Unknown</Link> | ||
</div> | ||
<div> | ||
<Link to="/bad">Error</Link> | ||
</div> | ||
<div> | ||
<Link to="/needauth">Requires Authorization</Link> | ||
</div> | ||
Render Mode: {props.page && props.page.mode ? props.page.mode : "?"} | ||
</div> | ||
) | ||
}; | ||
<div> | ||
<Link to="/about">About</Link> | ||
</div> | ||
<div> | ||
<Link to="/x">Unknown</Link> | ||
</div> | ||
<div> | ||
<Link to="/bad">Error</Link> | ||
</div> | ||
<div> | ||
<Link to="/needauth">Requires Authorization</Link> | ||
</div> | ||
</div> | ||
); | ||
|
||
export default Home; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const CHANGE_PAGE = "CHANGE_PAGE"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,36 @@ | ||
{ | ||
"name": "example", | ||
"version": "1.0.0", | ||
"description": "example", | ||
"devDependencies": { | ||
"babel-cli": "^6.24.1", | ||
"babel-loader": "^7.1.1", | ||
"babel-plugin-transform-runtime": "^6.23.0", | ||
"babel-preset-es2015": "^6.24.1", | ||
"babel-preset-react": "^6.24.1", | ||
"babel-preset-stage-0": "^6.24.1", | ||
"babel-preset-stage-2": "^6.22.0", | ||
"babel-register": "^6.24.1", | ||
"css-loader": "^0.28.4", | ||
"json-loader": "^0.5.4", | ||
"extract-text-webpack-plugin": "3.0.0", | ||
"postcss-loader": "^2.0.6", | ||
"postcss-nested": "^2.0.3", | ||
"style-loader": "^0.18.2", | ||
"webpack": "^3.2.0", | ||
"body-parser": "^1.17.1", | ||
"cookie-parser": "^1.4.3", | ||
"express": "^4.15.2" | ||
}, | ||
"dependencies": { | ||
"path-to-regexp": "^1.7.0", | ||
"uuid": "^3.1.0", | ||
"react": "^15.4.2", | ||
"react-dom": "^15.4.2", | ||
"redux": "^3.6.0", | ||
"react-redux": "^5.0.2", | ||
"redux-thunk": "^2.2.0", | ||
"axios": "^0.16.2", | ||
"nprogress": "^0.2.0", | ||
"history": "^4.5.1" | ||
} | ||
"name": "example", | ||
"version": "1.0.0", | ||
"description": "example", | ||
"devDependencies": { | ||
"babel-cli": "^6.24.1", | ||
"babel-loader": "^7.1.1", | ||
"babel-plugin-transform-runtime": "^6.23.0", | ||
"babel-preset-es2015": "^6.24.1", | ||
"babel-preset-react": "^6.24.1", | ||
"babel-preset-stage-0": "^6.24.1", | ||
"babel-preset-stage-2": "^6.22.0", | ||
"babel-register": "^6.24.1", | ||
"css-loader": "^0.28.4", | ||
"json-loader": "^0.5.4", | ||
"extract-text-webpack-plugin": "3.0.0", | ||
"postcss-loader": "^2.0.6", | ||
"postcss-nested": "^2.0.3", | ||
"style-loader": "^0.18.2", | ||
"webpack": "^3.2.0", | ||
"body-parser": "^1.17.1", | ||
"cookie-parser": "^1.4.3", | ||
"express": "^4.15.2" | ||
}, | ||
"dependencies": { | ||
"path-to-regexp": "^1.7.0", | ||
"uuid": "^3.1.0", | ||
"react": "^15.4.2", | ||
"react-dom": "^15.4.2", | ||
"redux": "^3.6.0", | ||
"react-redux": "^5.0.2", | ||
"axios": "^0.16.2", | ||
"nprogress": "^0.2.0", | ||
"history": "^4.5.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { CHANGE_PAGE } from "./../constants/action-types"; | ||
|
||
export const reducer = ( | ||
currentState = { | ||
location: "/", | ||
error: null, | ||
sortState: {}, | ||
modalKey: {} | ||
}, | ||
action | ||
) => { | ||
let update = {}; | ||
switch (action.type) { | ||
case CHANGE_PAGE: | ||
return Object.assign({}, action.data); | ||
|
||
default: | ||
return currentState; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.