{
return (
<>
- {group.status === "LOADING" || permissions.status === "LOADING" ? (
+ {group.isLoading || group.status === "IDLE" || permissions.isLoading ? (
) : (
diff --git a/src/state/usergroups/slice.ts b/src/state/usergroups/slice.ts
index a6a8189a3..370f23f04 100644
--- a/src/state/usergroups/slice.ts
+++ b/src/state/usergroups/slice.ts
@@ -17,6 +17,9 @@ export const userGroupSlice = createSlice({
deleteUserGroupReset: (state) => {
state.delete = initial.delete;
},
+ getUserGroupReset: (state) => {
+ state.currentGroup = initial.currentGroup;
+ },
},
extraReducers: (builder) =>
builder
@@ -78,4 +81,5 @@ export const {
createUserGroupReset,
updateUserGroupReset,
deleteUserGroupReset,
+ getUserGroupReset,
} = userGroupSlice.actions;
diff --git a/src/state/usergroups/thunk.ts b/src/state/usergroups/thunk.ts
index 39dc14647..8c08ec016 100644
--- a/src/state/usergroups/thunk.ts
+++ b/src/state/usergroups/thunk.ts
@@ -1,5 +1,6 @@
import { createAsyncThunk } from "@reduxjs/toolkit";
-import { UserGroupDTO, UserGroupsApi } from "../../generated";
+import { UserGroupDTO } from "generated/models/UserGroupDTO";
+import { UserGroupsApi } from "../../generated";
import { customConfiguration } from "../../libraries/apiUtils/configuration";
const api = new UserGroupsApi(customConfiguration());
@@ -74,4 +75,4 @@ export const revokePermission = createAsyncThunk(
.revokePermission({ groupCode, id: permissionId })
.toPromise()
.catch((error) => thunkApi.rejectWithValue(error.response))
-);
\ No newline at end of file
+);
diff --git a/src/state/usergroups/types.ts b/src/state/usergroups/types.ts
index 60eb05cee..65f0e2044 100644
--- a/src/state/usergroups/types.ts
+++ b/src/state/usergroups/types.ts
@@ -1,4 +1,4 @@
-import { UserGroupDTO } from "../../generated";
+import { UserGroupDTO } from "generated/models/UserGroupDTO";
import { ApiResponse } from "../types";
export type IUserGroupState = {