visuddhinanda пре 2 година
родитељ
комит
1346510128
1 измењених фајлова са 3 додато и 3 уклоњено
  1. 3 3
      dashboard/src/reducers/pr-load.ts

+ 3 - 3
dashboard/src/reducers/pr-load.ts

@@ -4,7 +4,7 @@ import type { RootState } from "../store";
 import { ISuggestionData } from "../components/api/Suggestion";
 import { ISuggestionData } from "../components/api/Suggestion";
 
 
 interface IState {
 interface IState {
-  suggestion?: ISuggestionData;
+  suggestion?: ISuggestionData | null;
 }
 }
 
 
 const initialState: IState = {};
 const initialState: IState = {};
@@ -13,7 +13,7 @@ export const slice = createSlice({
   name: "pr-load",
   name: "pr-load",
   initialState,
   initialState,
   reducers: {
   reducers: {
-    refresh: (state, action: PayloadAction<ISuggestionData>) => {
+    refresh: (state, action: PayloadAction<ISuggestionData | null>) => {
       state.suggestion = action.payload;
       state.suggestion = action.payload;
     },
     },
   },
   },
@@ -21,7 +21,7 @@ export const slice = createSlice({
 
 
 export const { refresh } = slice.actions;
 export const { refresh } = slice.actions;
 
 
-export const prInfo = (state: RootState): ISuggestionData | undefined =>
+export const prInfo = (state: RootState): ISuggestionData | null | undefined =>
   state.prLoad.suggestion;
   state.prLoad.suggestion;
 
 
 export default slice.reducer;
 export default slice.reducer;