first commit

This commit is contained in:
Hydra
2024-04-14 04:20:27 +01:00
commit 992ec5ab49
145 changed files with 37479 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
import { createSlice } from "@reduxjs/toolkit";
import type { PayloadAction } from "@reduxjs/toolkit";
import type { Game } from "@types";
interface LibraryState {
value: Game[];
}
const initialState: LibraryState = {
value: [],
};
export const librarySlice = createSlice({
name: "library",
initialState,
reducers: {
setLibrary: (state, action: PayloadAction<LibraryState["value"]>) => {
state.value = action.payload;
},
},
});
export const { setLibrary } = librarySlice.actions;