mirror of
https://github.com/zoo-labs/zoo.git
synced 2026-11-10 22:32:34 +00:00
14 lines
361 B
TypeScript
14 lines
361 B
TypeScript
import { addDrops } from "./action";
|
|
import { createReducer } from "@reduxjs/toolkit";
|
|
import type { AvailableEgg, Drop } from "../../types";
|
|
|
|
const initialState = {
|
|
drops: [] as Drop[],
|
|
};
|
|
|
|
export default createReducer(initialState, (builder) =>
|
|
builder.addCase(addDrops, (state, action) => {
|
|
state.drops = action.payload as unknown as Drop[];
|
|
})
|
|
);
|