mirror of
https://github.com/umami-software/umami.git
synced 2026-02-18 19:45:35 +01:00
[WebsiteList] add preloader, move to components
This commit is contained in:
parent
2d591a7906
commit
6cb85959b5
7 changed files with 210 additions and 95 deletions
|
|
@ -2,7 +2,7 @@ import { createSlice } from '@reduxjs/toolkit';
|
|||
|
||||
const websites = createSlice({
|
||||
name: 'websites',
|
||||
initialState: {},
|
||||
initialState: [],
|
||||
reducers: {
|
||||
updateWebsites(state, action) {
|
||||
state = action.payload;
|
||||
|
|
@ -27,3 +27,9 @@ export function setDateRange(websiteId, dateRange) {
|
|||
);
|
||||
};
|
||||
}
|
||||
|
||||
export function setWebsitesData(data) {
|
||||
return dispatch => {
|
||||
return dispatch(updateWebsites([...data]));
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue