mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-01 15:55:30 +01:00
18 lines
355 B
JavaScript
18 lines
355 B
JavaScript
|
import { createSlice } from '@reduxjs/toolkit';
|
||
|
|
||
|
const queries = createSlice({
|
||
|
name: 'queries',
|
||
|
initialState: {},
|
||
|
reducers: {
|
||
|
updateQuery(state, action) {
|
||
|
const { url, ...data } = action.payload;
|
||
|
state[url] = data;
|
||
|
return state;
|
||
|
},
|
||
|
},
|
||
|
});
|
||
|
|
||
|
export const { updateQuery } = queries.actions;
|
||
|
|
||
|
export default queries.reducer;
|