From cd24d8397a400de44131cae6ec0cfdca4a53d992 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=CC=81rgio=20Ramos?= Date: Tue, 13 Dec 2016 22:09:04 +0000 Subject: [PATCH] link dashboard and org pages --- frontend/.babelrc | 5 +- frontend/locales/en-us.json | 3 +- frontend/locales/pt-pt.json | 3 +- frontend/package.json | 13 ++- frontend/src/components/article/index.js | 2 - frontend/src/components/header/index.js | 9 +- frontend/src/containers/app.js | 11 +- frontend/src/containers/dashboard/index.js | 38 +++++++ frontend/src/containers/home/index.js | 118 +++++++++++++++++-- frontend/src/containers/org/index.js | 48 ++++++++ frontend/src/root.js | 18 ++- frontend/src/state/reducers/index.js | 3 +- frontend/src/state/reducers/session.js | 9 ++ frontend/test/_hook.js | 8 ++ frontend/test/index.js | 2 +- frontend/webpack/base.js | 17 +-- frontend/webpack/index.js | 1 + frontend/webpack/test.js | 8 +- frontend/yarn.lock | 125 +++++++++++++++------ yarn.lock | 38 +++---- 20 files changed, 377 insertions(+), 102 deletions(-) create mode 100644 frontend/src/containers/dashboard/index.js create mode 100644 frontend/src/containers/org/index.js create mode 100644 frontend/src/state/reducers/session.js create mode 100644 frontend/test/_hook.js diff --git a/frontend/.babelrc b/frontend/.babelrc index 55f06ce1..0304882a 100644 --- a/frontend/.babelrc +++ b/frontend/.babelrc @@ -37,9 +37,8 @@ "regenerator": false } ], - ["babel-plugin-webpack-loaders", { - "config": "${CONFIG}", - "verbose": false + ["babel-plugin-webpack-alias", { + "config": "${CONFIG}" }] ] } diff --git a/frontend/locales/en-us.json b/frontend/locales/en-us.json index 8f8d7125..0f179938 100644 --- a/frontend/locales/en-us.json +++ b/frontend/locales/en-us.json @@ -1,3 +1,4 @@ { - "greetings": "Hello" + "your-dashboard": "Your Dashboard", + "welcome-to": "Welcome to" } \ No newline at end of file diff --git a/frontend/locales/pt-pt.json b/frontend/locales/pt-pt.json index 1eb32ea0..f88ebb3e 100644 --- a/frontend/locales/pt-pt.json +++ b/frontend/locales/pt-pt.json @@ -1,3 +1,4 @@ { - "greetings": "Olá" + "your-dashboard": "O seu painel", + "welcome-to": "Bem vindo a" } \ No newline at end of file diff --git a/frontend/package.json b/frontend/package.json index 83cf8597..e889283c 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -25,6 +25,7 @@ "locale": "^0.1.0", "lodash.template": "^4.4.0", "lodash.uniq": "^4.5.0", + "param-case": "^2.1.0", "querystring": "^0.2.0", "react": "^15.4.1", "react-a11y": "^0.3.3", @@ -36,7 +37,7 @@ "react-router": "^4.0.0-alpha.4", "reduce-reducers": "^0.1.2", "redux": "^3.6.0", - "redux-actions": "^1.1.0", + "redux-actions": "^1.2.0", "redux-batched-actions": "^0.1.5", "redux-logger": "^2.7.4", "redux-promise-middleware": "^4.2.0", @@ -57,12 +58,13 @@ "babel-plugin-transform-es2015-modules-commonjs": "^6.18.0", "babel-plugin-transform-object-rest-spread": "^6.20.2", "babel-plugin-transform-runtime": "^6.15.0", + "babel-plugin-webpack-alias": "^2.1.2", "babel-plugin-webpack-loaders": "^0.8.0", "babel-preset-env": "^1.0.2", "babel-preset-react": "^6.16.0", "babel-register": "^6.18.0", "enzyme": "^2.6.0", - "eslint": "^3.12.0", + "eslint": "^3.12.1", "eslint-config-semistandard": "^7.0.0", "eslint-config-standard": "^6.2.1", "eslint-plugin-babel": "^4.0.0", @@ -73,20 +75,21 @@ "fast-async": "^6.1.2", "json-loader": "^0.5.4", "ncp": "^2.0.0", + "node-hook": "^0.4.0", "nyc": "^10.0.0", - "pre-commit": "^1.2.1", + "pre-commit": "^1.2.2", "react-addons-test-utils": "^15.4.1", "tap-xunit": "^1.4.0", "thenify": "^3.2.1", "webpack": "^2.1.0-beta.25", "webpack-dev-server": "^1.16.2", - "webpack-shell-plugin": "^0.4.9" + "webpack-shell-plugin": "^0.5.0" }, "ava": { "failFast": true, "cache": false, "require": [ - "babel-register" + "./test/_hook.js" ], "babel": "inherit" }, diff --git a/frontend/src/components/article/index.js b/frontend/src/components/article/index.js index 30751514..229e5525 100644 --- a/frontend/src/components/article/index.js +++ b/frontend/src/components/article/index.js @@ -1,6 +1,4 @@ -const React = require('react'); const Styled = require('styled-components'); - const fns = require('@ui/shared/functions'); const { diff --git a/frontend/src/components/header/index.js b/frontend/src/components/header/index.js index 306cfa6f..955e1188 100644 --- a/frontend/src/components/header/index.js +++ b/frontend/src/components/header/index.js @@ -1,4 +1,5 @@ const React = require('react'); +const ReactRouter = require('react-router'); const Styled = require('styled-components'); const Column = require('@ui/components/column'); @@ -7,6 +8,10 @@ const fns = require('@ui/shared/functions'); const logo = require('@resources/logo.png'); const Row = require('@ui/components/row'); +const { + Link +} = ReactRouter; + const { default: styled } = Styled; @@ -35,7 +40,9 @@ const Header = () => { - + + + diff --git a/frontend/src/containers/app.js b/frontend/src/containers/app.js index a42b984b..25b3f603 100644 --- a/frontend/src/containers/app.js +++ b/frontend/src/containers/app.js @@ -29,6 +29,7 @@ const { } = Styled; const App = connect()(React.createClass({ + displayName: 'App', propTypes: { children: React.PropTypes.node, dispatch: React.PropTypes.func, @@ -71,14 +72,8 @@ module.exports = (props) => {
- - + +