From 3f46d6881a538a6b87490fc0b2eabd0c98bbc20e Mon Sep 17 00:00:00 2001 From: suxiaoxin Date: Fri, 11 Aug 2017 11:26:07 +0800 Subject: [PATCH 1/4] feat: fix redus-tools bug --- client/reducer/create.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/reducer/create.js b/client/reducer/create.js index e2ed598f..686341dc 100644 --- a/client/reducer/create.js +++ b/client/reducer/create.js @@ -2,7 +2,7 @@ import { createStore as _createStore, applyMiddleware, compose } from 'redux'; import thunkMiddleware from 'redux-thunk'; import promiseMiddleware from 'redux-promise'; import messageMiddleware from './middleware/messageMiddleware'; -import DevTools from '../containers/DevTools/DevTools'; + import reducer from './modules/reducer'; export default function createStore(initialState = {}) { @@ -12,8 +12,9 @@ export default function createStore(initialState = {}) { if (ENV_PARAMS.development) { finalCreateStore = compose( applyMiddleware(...middleware), - window.devToolsExtension ? window.devToolsExtension() : DevTools.instrument() + window.devToolsExtension ? window.devToolsExtension() : require('../cntainers/DevTools/DevTools').default.instrument() )(_createStore); + } else { finalCreateStore = applyMiddleware(...middleware)(_createStore); } From e242eb87157443fbbb08acab98371b635a572dda Mon Sep 17 00:00:00 2001 From: zwjamnsss Date: Fri, 11 Aug 2017 11:26:49 +0800 Subject: [PATCH 2/4] fix: eslint --- client/Application.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/Application.js b/client/Application.js index 24586340..7dfb80fe 100644 --- a/client/Application.js +++ b/client/Application.js @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; -import { Route, BrowserRouter as Router, Redirect, Switch } from 'react-router-dom'; +import { Route, BrowserRouter as Router } from 'react-router-dom'; import { Home, Group, Project, Follows, AddProject } from './containers/index'; import User from './containers/User/User.js'; import Header from './components/Header/Header'; From 2d8df12dd0c7b01070862c993adce3a3e7d0b215 Mon Sep 17 00:00:00 2001 From: zwjamnsss Date: Fri, 11 Aug 2017 11:31:21 +0800 Subject: [PATCH 3/4] fix: contaimer --- .tags | 2 +- .tags1 | 6 +----- client/reducer/create.js | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.tags b/.tags index 7ca8a568..5e7e0fce 100644 --- a/.tags +++ b/.tags @@ -177,7 +177,6 @@ static.form /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroup render /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/ProjectList/UpDateModal.js /^ render() {$/;" function line:152 validator /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/ProjectList/UpDateModal.js /^ validator(rule, value, callback) {$/;" function line:191 validator /Users/qitmac000445/Desktop/YAPI/yapi/client/containers/ProjectGroups/ProjectList/UpDateModal.js /^ validator(rule, value, callback) {$/;" function line:224 -createStore /Users/qitmac000445/Desktop/YAPI/yapi/client/reducer/create.js /^export default function createStore(initialState = {}) {$/;" function line:8 module.exports.parser /Users/qitmac000445/Desktop/YAPI/yapi/client/.eslintrc.js /^module.exports = {$/;" property line:1 module.exports.extends /Users/qitmac000445/Desktop/YAPI/yapi/client/.eslintrc.js /^ parser: 'babel-eslint',$/;" property line:2 const.groupList /Users/qitmac000445/Desktop/YAPI/yapi/client/reducer/modules/group.js /^const initialState = {$/;" property line:8 @@ -461,3 +460,4 @@ state.login /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ th static.checkLoginState /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ static propTypes = {$/;" property line:33 componentDidMount /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ componentDidMount() {$/;" function line:45 render /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ render() {$/;" function line:78 +createStore /Users/qitmac000445/Desktop/YAPI/yapi/client/reducer/create.js /^export default function createStore(initialState = {}) {$/;" function line:8 diff --git a/.tags1 b/.tags1 index 70389e15..9de1e851 100644 --- a/.tags1 +++ b/.tags1 @@ -4,8 +4,4 @@ !_TAG_PROGRAM_NAME Exuberant Ctags // !_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ !_TAG_PROGRAM_VERSION 5.8 // -constructor /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ constructor(props) {$/;" function line:26 -state.login /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ this.state = {$/;" property line:28 -static.checkLoginState /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ static propTypes = {$/;" property line:33 -componentDidMount /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ componentDidMount() {$/;" function line:45 -render /Users/qitmac000445/Desktop/YAPI/yapi/client/Application.js /^ render() {$/;" function line:78 +createStore /Users/qitmac000445/Desktop/YAPI/yapi/client/reducer/create.js /^export default function createStore(initialState = {}) {$/;" function line:8 diff --git a/client/reducer/create.js b/client/reducer/create.js index 686341dc..44095230 100644 --- a/client/reducer/create.js +++ b/client/reducer/create.js @@ -12,7 +12,7 @@ export default function createStore(initialState = {}) { if (ENV_PARAMS.development) { finalCreateStore = compose( applyMiddleware(...middleware), - window.devToolsExtension ? window.devToolsExtension() : require('../cntainers/DevTools/DevTools').default.instrument() + window.devToolsExtension ? window.devToolsExtension() : require('../containers/DevTools/DevTools').default.instrument() )(_createStore); } else { From 9e79bee96826c5c322cb23b38b950260938c0c1b Mon Sep 17 00:00:00 2001 From: suxiaoxin Date: Fri, 11 Aug 2017 11:32:20 +0800 Subject: [PATCH 4/4] fix: create and app bug --- client/Application.js | 2 +- client/reducer/create.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/Application.js b/client/Application.js index 24586340..7dfb80fe 100644 --- a/client/Application.js +++ b/client/Application.js @@ -1,7 +1,7 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; -import { Route, BrowserRouter as Router, Redirect, Switch } from 'react-router-dom'; +import { Route, BrowserRouter as Router } from 'react-router-dom'; import { Home, Group, Project, Follows, AddProject } from './containers/index'; import User from './containers/User/User.js'; import Header from './components/Header/Header'; diff --git a/client/reducer/create.js b/client/reducer/create.js index 686341dc..e0a4ae64 100644 --- a/client/reducer/create.js +++ b/client/reducer/create.js @@ -2,7 +2,7 @@ import { createStore as _createStore, applyMiddleware, compose } from 'redux'; import thunkMiddleware from 'redux-thunk'; import promiseMiddleware from 'redux-promise'; import messageMiddleware from './middleware/messageMiddleware'; - +import DevTools from '../containers/DevTools/DevTools' import reducer from './modules/reducer'; export default function createStore(initialState = {}) { @@ -12,7 +12,7 @@ export default function createStore(initialState = {}) { if (ENV_PARAMS.development) { finalCreateStore = compose( applyMiddleware(...middleware), - window.devToolsExtension ? window.devToolsExtension() : require('../cntainers/DevTools/DevTools').default.instrument() + window.devToolsExtension ? window.devToolsExtension() : DevTools.instrument() )(_createStore); } else {