umami.waylonwalker.com/redux/actions/queries.js
WaylonWalker 4047a7ec23 Initial commit
Created from https://vercel.com/new
2021-12-08 18:25:42 +00:00

17 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;