mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-26 12:21:03 +00:00
first commit
This commit is contained in:
26
src/renderer/features/repackers-friendly-names-slice.ts
Normal file
26
src/renderer/features/repackers-friendly-names-slice.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import { createSlice } from "@reduxjs/toolkit";
|
||||
import type { PayloadAction } from "@reduxjs/toolkit";
|
||||
|
||||
interface RepackersFriendlyNamesState {
|
||||
value: Record<string, string>;
|
||||
}
|
||||
|
||||
const initialState: RepackersFriendlyNamesState = {
|
||||
value: {},
|
||||
};
|
||||
|
||||
export const repackersFriendlyNamesSlice = createSlice({
|
||||
name: "repackersFriendlyNames",
|
||||
initialState,
|
||||
reducers: {
|
||||
setRepackersFriendlyNames: (
|
||||
state,
|
||||
action: PayloadAction<RepackersFriendlyNamesState["value"]>
|
||||
) => {
|
||||
state.value = action.payload;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export const { setRepackersFriendlyNames } =
|
||||
repackersFriendlyNamesSlice.actions;
|
||||
Reference in New Issue
Block a user