Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
412 changes: 142 additions & 270 deletions generators/app/index.js

Large diffs are not rendered by default.

63 changes: 13 additions & 50 deletions generators/app/templates/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,55 +8,19 @@
"url": "<%= repoUrl %>"
},
"dependencies": {
<% if (includeRadium) {%>
"radium": "^0.19.4",<%
}

if (includeMobileDetect) {%>
"mobile-detect": "^1.3.7",<%
}

if (includeMoment) {%>
"moment": "^2.18.1",<%
}

if (includeNukaCarousel) {%>
"nuka-carousel": "^2.3.0",<%
}

if (includeNumeral) {%>
"numeral": "^2.0.6",<%
}

if (includeReactAlert) {%>
"react-alert": "^2.3.0",<%
}

if (includeReactModal) {%>
"react-modal": "^2.3.2",<%
}

if (includeReactResponsive) {%>
"react-responsive": "^1.3.4",<%
}

if (includeReactScroll) {%>
"react-scroll": "^1.5.4",<%
}

if (includeReactShare) {%>
"react-share": "^1.16.0",<%
}

if (includeReactVirtualized) {%>
"react-virtualized": "^9.9.0",<%
}

if (includeRecharts) {%>
"recharts": "^1.0.0-alpha.4",<%
}

if (includeReactGoogleMaps) {%>
<% if (includeAll) {%>
"radium": "^0.19.4",
"mobile-detect": "^1.3.7",
"moment": "^2.18.1",
"nuka-carousel": "^2.3.0",
"numeral": "^2.0.6",
"react-alert": "^2.3.0",
"react-modal": "^2.3.2",
"react-responsive": "^1.3.4",
"react-scroll": "^1.5.4",
"react-share": "^1.16.0",
"react-virtualized": "^9.9.0",
"recharts": "^1.0.0-alpha.4",
"react-google-maps": "^7.3.0",<%
}%>
"reselect": "^3.0.1",
Expand All @@ -67,7 +31,6 @@
"postcss": "^6.0.11",
"prop-types": "^15.5.10",
"react": "^15.6.1",
"react-addons-perf": "^15.4.2",
"react-dom": "^15.6.1",
"react-redux": "^5.0.6",
"react-router": "^4.2.0",
Expand Down
9 changes: 1 addition & 8 deletions generators/app/templates/src/app/components/Routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import { ConnectedRouter } from "react-router-redux";
import { Switch } from "react-router-dom";

import { history } from "../../../redux/store";
import Home from "../../screens/Dashboard/screens/Home";
import Login from "../../screens/Login";
import Home from "../../screens/Dashboard";

import AuthenticatedRoute from "./components/AuthenticatedRoute";
import * as Routes from "./constants";
Expand All @@ -21,12 +20,6 @@ function AppRoutes() {
path={Routes.HOME}
component={Home}
/>
<AuthenticatedRoute
isPublicRoute
exact
path={Routes.LOGIN}
component={Login}
/>
</Switch>
</div>
</ConnectedRouter>
Expand Down
15 changes: 5 additions & 10 deletions generators/app/templates/src/app/index.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
import React, { Component } from "react";
import { connect } from "react-redux";
import { StyleRoot } from "radium";
import React, { Component } from 'react';
import { connect } from 'react-redux';

import { apiSetup } from "../config/api";
import { apiSetup } from '../config/api';

import Routes from "./components/Routes";
import Routes from './components/Routes';

class App extends Component {
componentDidMount() {
apiSetup(this.props.dispatch);
}

render() {
return (
<StyleRoot>
<Routes />
</StyleRoot>
);
return <Routes />;
}
}

Expand Down
40 changes: 11 additions & 29 deletions generators/app/templates/src/app/screens/Dashboard/index.js
Original file line number Diff line number Diff line change
@@ -1,40 +1,22 @@
import React from "react";
import { connect } from "react-redux";
import Radium from "radium";
import { Route, Switch, Redirect } from "react-router-dom";
import PropTypes from "prop-types";
import React from 'react';
import { connect } from 'react-redux';
import { Route, Switch, Redirect } from 'react-router-dom';

import * as Routes from "../../components/Routes/constants";
import * as Routes from '../../components/Routes/constants';

import Home from "./screens/Home";
import Login from "../Login";
import Home from './screens/Home';

import styles from "./styles";

function Dashboard({ loading }) {
function Dashboard() {
return (
<div style={styles.base}>
<div style={styles.baseContent}>
{/* <Topbar />
<Sidebar /> */}
<div style={styles.content}>
<Switch>
<Route exact path={Routes.HOME} component={Home} />
<Route exact path={Routes.LOGIN} component={Login} />
<Route render={() => <Redirect to={Routes.HOME} />} />
</Switch>
</div>
</div>
</div>
<Switch>
<Route exact path={Routes.HOME} component={Home} />
<Route render={() => <Redirect to={Routes.HOME} />} />
</Switch>
);
}

Dashboard.defaultProps = {
loading: false
};

Dashboard.propTypes = {
loading: PropTypes.bool.isRequired
};

export default connect()(Radium(Dashboard));
export default connect()(Dashboard);
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
import React, { Component } from "react";
import { connect } from "react-redux";
import React from "react";

import { actionCreators as authActions } from "../../../../../redux/Auth/actions";
import Home from "./layout";

class HomeContainer extends Component {
handleLogout = () => {
this.props.dispatch(authActions.logout());
};

render() {
return <Home onLogout={this.handleLogout} />;
}
export default function Home() {
return <div />;
}

export default connect()(HomeContainer);

This file was deleted.

This file was deleted.

23 changes: 0 additions & 23 deletions generators/app/templates/src/app/screens/Dashboard/styles.js

This file was deleted.

36 changes: 0 additions & 36 deletions generators/app/templates/src/app/screens/Login/index.js

This file was deleted.

79 changes: 0 additions & 79 deletions generators/app/templates/src/app/screens/Login/layout.js

This file was deleted.

10 changes: 0 additions & 10 deletions generators/app/templates/src/app/screens/Login/strings.js

This file was deleted.

Loading