1
0
Dieser Commit ist enthalten in:
2023-11-06 16:12:42 +05:30
Commit c9a96798e9
188 geänderte Dateien mit 68949 neuen und 0 gelöschten Zeilen
+1
Datei anzeigen
@@ -0,0 +1 @@
export const CHART = 'CHART';
+23
Datei anzeigen
@@ -0,0 +1,23 @@
import { CHART } from '../actions/type';
const initialState = {
statistics: {
name: 'Statistics',
data: [33, 33, 34],
},
};
const DoughnutChart = (state = initialState, action) => {
const { payload, type } = action;
switch (type) {
case CHART:
return {
...state,
payload,
};
default:
return state;
}
};
export default DoughnutChart;
+24
Datei anzeigen
@@ -0,0 +1,24 @@
import { CHART } from '../actions/type';
const initialState = {
expenses: {
name: 'Expenses',
youtube: [65, 59, 80, 81, 56, 55, 40,80, 81, 56, 55, 40],
facebook: [40, 105, 92, 155, 138, 205, 120,92, 155, 138, 205, 120],
},
};
const LineChart = (state = initialState, action) => {
const { payload, type } = action;
switch (type) {
case CHART:
return {
...state,
payload,
};
default:
return state;
}
};
export default LineChart;
+23
Datei anzeigen
@@ -0,0 +1,23 @@
import { CHART } from '../actions/type';
const initialState = {
investment: {
name: 'Investment',
data: [50, 26, 36, 30, 46, 38, 60],
},
};
const LineInvestment = (state = initialState, action) => {
const { payload, type } = action;
switch (type) {
case CHART:
return {
...state,
payload,
};
default:
return state;
}
};
export default LineInvestment;
+11
Datei anzeigen
@@ -0,0 +1,11 @@
import { combineReducers } from 'redux';
import LineChart from './lineChart';
import DoughnutChart from './doughnutChart';
import LineInvestment from './lineInvestment'
export default combineReducers({
LineChart,
DoughnutChart,
LineInvestment
});
+15
Datei anzeigen
@@ -0,0 +1,15 @@
import { applyMiddleware, createStore } from "redux";
import thunk from "redux-thunk";
import rootReducers from "./reducers/root";
const initialState = {};
const middleware = [thunk];
const store = createStore(
rootReducers,
initialState,
applyMiddleware(...middleware)
)
export default store;