Skip to content

Commit

Permalink
uncomment activeInput state
Browse files Browse the repository at this point in the history
  • Loading branch information
HaruHunab1320 committed Jun 19, 2024
1 parent 942419b commit 84a4a0b
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions packages/client/state/src/lib/globalConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import { createSlice, PayloadAction, Slice } from '@reduxjs/toolkit'
import { SaveDiffData } from 'packages/client/feathers-client/src/lib/FeathersClient'
import { RootState } from './store'

// type ActiveInputType = {
// name: string
// inputType: string
// value: string
// nodeId: string
// }
type ActiveInputType = {
name: string
inputType: string
value: string
nodeId: string
}

/**
* Interface that defines the Global Config type.
Expand All @@ -26,7 +26,7 @@ export interface GlobalConfig {
theme: string
dockviewTheme: string
textEditorState: string
// activeInput: ActiveInputType
activeInput: ActiveInputType
pastState: SaveDiffData[]
futureState: SaveDiffData[]
layoutChangeEvent: boolean
Expand All @@ -48,12 +48,12 @@ export const globalConfigSlice: Slice<GlobalConfig> = createSlice({
textEditorState: '',
pastState: [] as SaveDiffData[],
futureState: [] as SaveDiffData[],
// activeInput: {
// name: '',
// inputType: '',
// value: '',
// nodeId: '',
// },
activeInput: {
name: '',
inputType: '',
value: '',
nodeId: '',
},
dockviewTheme: 'dockview-theme-night',
theme: 'abyss',
layoutChangeEvent: false as boolean,
Expand Down Expand Up @@ -159,12 +159,12 @@ export const globalConfigSlice: Slice<GlobalConfig> = createSlice({
): void => {
state.dockviewTheme = action.payload
},
// setActiveInput: (
// state: GlobalConfig,
// action: PayloadAction<ActiveInputType>
// ): void => {
// state.activeInput = action.payload
// },
setActiveInput: (
state: GlobalConfig,
action: PayloadAction<ActiveInputType>
): void => {
state.activeInput = action.payload
},
setLayoutChangeEvent: (
state: GlobalConfig,
action: PayloadAction<boolean>
Expand All @@ -189,7 +189,7 @@ export const {
setDockviewTheme,
setCurrentSpellReleaseId,
setTextEditorState,
// setActiveInput,
setActiveInput,
setLayoutChangeEvent,
applyState,
undoState,
Expand All @@ -202,13 +202,13 @@ export const {
*/
export default globalConfigSlice.reducer

// export const selectActiveInput = (state: RootState) =>
// state.globalConfig.activeInput as {
// name: string
// inputType: string
// value: string
// nodeId: string
// }
export const selectActiveInput = (state: RootState) =>
state.globalConfig.activeInput as {
name: string
inputType: string
value: string
nodeId: string
}

export const selectPastState = (state: RootState) =>
state.globalConfig.pastState
Expand Down

0 comments on commit 84a4a0b

Please sign in to comment.