Skip to content
Snippets Groups Projects

Ui refactor style

Merged Matthias Feyll requested to merge ui-refactor-style into ui-integration
6 files
+ 46
36
Compare changes
  • Side-by-side
  • Inline
Files
6
import { PndServiceGetPndListApiArg, api } from "@api/api"
import { createAsyncThunk } from "@reduxjs/toolkit"
import { setPnds } from "../reducer/device.reducer"
// TODO rethink this. This should be in the shared part bc its getting invoked in the procteded layout
export const fetchPnds = createAsyncThunk('device/fetchPnds', (_, thunkApi) => {
const payload: PndServiceGetPndListApiArg = {
timestamp: new Date().getTime().toString(),
}
const subscription = thunkApi.dispatch(api.endpoints.pndServiceGetPndList.initiate(payload))
subscription.unwrap().then((response) => {
thunkApi.dispatch(setPnds(response.pnd))
})
})
\ No newline at end of file
Loading