Stats Page Foundation with Chart.js

This commit is contained in:
Qstick
2021-01-09 00:04:55 -05:00
parent 76c271fab0
commit 88d1a3db6f
15 changed files with 394 additions and 3 deletions

View File

@@ -0,0 +1,46 @@
import { createThunk, handleThunks } from 'Store/thunks';
import createFetchHandler from './Creators/createFetchHandler';
import createHandleActions from './Creators/createHandleActions';
//
// Variables
export const section = 'indexerStats';
//
// State
export const defaultState = {
isFetching: false,
isPopulated: false,
error: null,
items: [],
details: {
isFetching: false,
isPopulated: false,
error: null,
items: []
}
};
//
// Actions Types
export const FETCH_INDEXER_STATS = 'indexerStats/fetchIndexerStats';
//
// Action Creators
export const fetchIndexerStats = createThunk(FETCH_INDEXER_STATS);
//
// Action Handlers
export const actionHandlers = handleThunks({
[FETCH_INDEXER_STATS]: createFetchHandler(section, '/indexerStats')
});
//
// Reducers
export const reducers = createHandleActions({}, defaultState, section);