Skip to content

Commit

Permalink
Removed unnessary APIs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Imiss-U1025 committed Nov 29, 2024
1 parent cb881eb commit f8a55dd
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ export const QueryLibraryEditor = () => {

useEffect(() => {
if (orgId) {
dispatch(fetchQueryLibrary());
dispatch(fetchDataSourceTypes({ organizationId: orgId }));
dispatch(
fetchDatasource({
organizationId: orgId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import React, { useEffect, useMemo } from "react";
import { useDispatch } from "react-redux";
import {
deleteGroupUserAction,
fetchGroupUsersAction,
quitGroupAction,
updateUserGroupRoleAction,
} from "redux/reduxActions/orgActions";
Expand Down Expand Up @@ -65,9 +64,6 @@ function GroupUsersPermission(props: GroupPermissionProp) {
});
}, [groupUsers]);
const dispatch = useDispatch();
useEffect(() => {
dispatch(fetchGroupUsersAction({ groupId: group.groupId }));
}, []);
return (
<>
<PermissionHeaderWrapper>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ function OrgUsersPermission(props: UsersPermissionProp) {
});
}, [orgUsers]);

useEffect(() => {
dispatch(fetchOrgUsersAction(orgId));
}, [dispatch, orgId]);
// useEffect(() => {
// dispatch(fetchOrgUsersAction(orgId));
// }, [dispatch, orgId]);

const onResetPass = (userId: string) => {
return UserApi.resetPassword(userId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,7 @@ export default function PermissionSetting() { const user = useSelector(getUser)
const orgUsersFetching = useSelector((state: AppState) => state.ui.org.orgUsersFetching);

const groupIdMap = new Map(orgGroups.map((group) => [group.groupId, group]));
const dispatch = useDispatch();
const selectKey = useParams<{ groupId: string }>().groupId;
useEffect(() => {
if (!orgId) {
return;
}
dispatch(fetchGroupsAction(orgId));
}, [orgId]);

useEffect( () => {
if (selectKey !== "users")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,6 @@ export default function PermissionSetting() {
del: false,
rename: false,
}] : [];
useEffect(() => {
if (!orgId) {
return;
}
dispatch(fetchGroupsAction(orgId));
}, [orgId]);
if (!orgId) {
return null;
}
Expand Down

0 comments on commit f8a55dd

Please sign in to comment.