mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-03-02 03:50:40 +00:00
Fix: warning
This commit is contained in:
parent
02b043167b
commit
61e33a9f08
@ -24,19 +24,25 @@ const deviceHealthSlice = createSlice({
|
|||||||
name: 'deviceHealth',
|
name: 'deviceHealth',
|
||||||
initialState,
|
initialState,
|
||||||
reducers: {
|
reducers: {
|
||||||
setStorage: (state, action: PayloadAction<{ storage: number; maxStorage: number }>) => {
|
setStorage: (
|
||||||
|
state: DeviceHealthState,
|
||||||
|
action: PayloadAction<{ storage: number; maxStorage: number }>,
|
||||||
|
) => {
|
||||||
state.storage = action.payload.storage
|
state.storage = action.payload.storage
|
||||||
state.maxStorage = action.payload.maxStorage
|
state.maxStorage = action.payload.maxStorage
|
||||||
},
|
},
|
||||||
setCpuLoad: (state, action: PayloadAction<number[]>) => {
|
setCpuLoad: (state: DeviceHealthState, action: PayloadAction<number[]>) => {
|
||||||
state.cpuLoad = action.payload
|
state.cpuLoad = action.payload
|
||||||
},
|
},
|
||||||
setMemory: (state, action: PayloadAction<{ memory: number[]; maxMemory: number }>) => {
|
setMemory: (
|
||||||
|
state: DeviceHealthState,
|
||||||
|
action: PayloadAction<{ memory: number[]; maxMemory: number }>,
|
||||||
|
) => {
|
||||||
state.memory = action.payload.memory
|
state.memory = action.payload.memory
|
||||||
state.maxMemory = action.payload.maxMemory
|
state.maxMemory = action.payload.maxMemory
|
||||||
},
|
},
|
||||||
setNetworkHealth: (
|
setNetworkHealth: (
|
||||||
state,
|
state: DeviceHealthState,
|
||||||
action: PayloadAction<{ uploadRate: number[]; downloadRate: number[] }>,
|
action: PayloadAction<{ uploadRate: number[]; downloadRate: number[] }>,
|
||||||
) => {
|
) => {
|
||||||
state.uploadRate = action.payload.uploadRate
|
state.uploadRate = action.payload.uploadRate
|
||||||
@ -45,7 +51,6 @@ const deviceHealthSlice = createSlice({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
export const { setStorage, setCpuLoad, setMemory, setNetworkHealth} =
|
export const { setStorage, setCpuLoad, setMemory, setNetworkHealth } = deviceHealthSlice.actions
|
||||||
deviceHealthSlice.actions
|
|
||||||
|
|
||||||
export default deviceHealthSlice.reducer
|
export default deviceHealthSlice.reducer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user