+
+ {props.errors.length > 0 && ( props.errors.map((error)=>{
+ return (
+ {error.code} : {error.message}
+
)
+ }))
+ }
+
+ );
+}
+
+export default UserErrors;
\ No newline at end of file
diff --git a/src/containers/Accounts.js b/src/containers/Accounts.js
index 5fdd330..9a37f29 100644
--- a/src/containers/Accounts.js
+++ b/src/containers/Accounts.js
@@ -56,7 +56,7 @@ class AddAccountContainer extends React.Component {
-
diff --git a/src/reducers/MyBarChart.js b/src/reducers/MyBarChart.js
new file mode 100644
index 0000000..fd0d2fc
--- /dev/null
+++ b/src/reducers/MyBarChart.js
@@ -0,0 +1,68 @@
+import React from 'react';
+import {withStyles} from 'material-ui/styles';
+import {
+ BarChart,
+ Bar,
+ XAxis,
+ YAxis,
+ Legend,
+ CartesianGrid,
+ Tooltip,
+ ResponsiveContainer
+} from 'recharts';
+import Paper from 'material-ui/Paper';
+
+const styles = theme => ({
+ root: {
+ WebkitBoxSizing: "border-box",
+ MozBoxSizing: "border-box",
+ padding: 10,
+ height: 300,
+ backgroundColor: "#fff"
+ },
+ paper: theme
+ .mixins
+ .gutters({
+
+ boxSizing: "border - box",
+ paddingLeft: 16,
+ paddingRight: 16,
+ marginTop: theme.spacing.unit * 3,
+ marginLeft: 10,
+ marginRight: 10,
+ overflowX: 'auto'
+ })
+});
+
+class MyBarChart extends React.Component {
+
+ render() {
+
+ const {classes} = this.props;
+ return (
+
+ {this.props.title}
+
+
+
+
+ {/**/}
+
+
+ {/**/}
+
+
+
+
+
+
+
+
+ )
+ }
+}
+
+export default withStyles(styles)(MyBarChart);
\ No newline at end of file
diff --git a/src/reducers/errors.js b/src/reducers/errors.js
new file mode 100644
index 0000000..9823f41
--- /dev/null
+++ b/src/reducers/errors.js
@@ -0,0 +1,14 @@
+export default(state = {}, action) => {
+ switch (action.type) {
+ case 'ADD_ERROR':
+ return[
+ ...state,
+ action.error
+ ]
+ case 'RESET_ERROR':
+ return {};
+ default:
+ return state;
+ }
+ };
+
\ No newline at end of file
diff --git a/src/store/configureStore.js b/src/store/configureStore.js
index a1a1d2d..69c8301 100644
--- a/src/store/configureStore.js
+++ b/src/store/configureStore.js
@@ -7,6 +7,7 @@ import accountsReducer from '../reducers/accounts';
import transactionsReducer from '../reducers/transactions';
import categoriesReducer from '../reducers/categories';
import filtersReducer from '../reducers/filters';
+import errorsReducer from '../reducers/errors';
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
export default () => {
@@ -17,7 +18,8 @@ export default () => {
accounts: accountsReducer,
transactions: transactionsReducer,
categories: categoriesReducer,
- filters: filtersReducer
+ filters: filtersReducer,
+ errors : errorsReducer
}),
composeEnhancers(applyMiddleware(thunk))
);