Skip to content

Commit

Permalink
fix: linting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyWMitchell committed Jan 20, 2025
1 parent a374115 commit 4d273c4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { EmptyState, EmptyStateBody, EmptyStateHeader, EmptyStateIcon, Pagination } from '@patternfly/react-core';
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import React, { useCallback, useEffect, useMemo, useState } from 'react';
import { DataView, DataViewState, DataViewTable, DataViewToolbar, useDataViewPagination, useDataViewSelection } from '@patternfly/react-data-view';
import { useDispatch, useSelector } from 'react-redux';
import { fetchServiceAccountsForGroup } from '../../../../../redux/actions/group-actions';
import { RBACStore } from '../../../../../redux/store';
import { mappedProps } from '../../../../../helpers/shared/helpers';
import { fetchServiceAccounts } from '../../../../../redux/actions/service-account-actions';
import useChrome from '@redhat-cloud-services/frontend-components/useChrome';
Expand Down Expand Up @@ -54,7 +53,11 @@ const reducer = ({ serviceAccountReducer }: { serviceAccountReducer: ServiceAcco
offset: serviceAccountReducer.offset,
});

const EditGroupServiceAccountsTable: React.FunctionComponent<EditGroupServiceAccountsTableProps> = ({ groupId, onChange, initialServiceAccountIds }) => {
const EditGroupServiceAccountsTable: React.FunctionComponent<EditGroupServiceAccountsTableProps> = ({
groupId,
onChange,
initialServiceAccountIds,
}) => {
const dispatch = useDispatch();
const pagination = useDataViewPagination({ perPage: 20 });
const { page, perPage, onSetPage, onPerPageSelect } = pagination;
Expand Down Expand Up @@ -99,10 +102,6 @@ const EditGroupServiceAccountsTable: React.FunctionComponent<EditGroupServiceAcc
}
}, [serviceAccounts.length, isLoading]);

const { groupServiceAccounts: groupServiceAccounts } = useSelector((state: RBACStore) => ({
groupServiceAccounts: state.groupReducer?.selectedGroup?.serviceAccounts?.data || [],
}));

const fetchData = useCallback(
async (apiProps: { count: number; limit: number; offset: number; orderBy: string }) => {
if (groupId) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { EmptyState, EmptyStateBody, EmptyStateHeader, EmptyStateIcon, Pagination } from '@patternfly/react-core';
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import React, { useCallback, useEffect, useMemo, useState } from 'react';
import { DataView, DataViewState, DataViewTable, DataViewToolbar, useDataViewPagination, useDataViewSelection } from '@patternfly/react-data-view';
import { useDispatch, useSelector } from 'react-redux';
import { RBACStore } from '../../../../../redux/store';
Expand Down Expand Up @@ -71,9 +71,8 @@ const EditGroupUsersTable: React.FunctionComponent<EditGroupUsersTableProps> = (
onSelect(true, initialSelectedUsers);
}, [initialUserIds]);

const { users, groupUsers, totalCount, isLoading } = useSelector((state: RBACStore) => ({
const { users, totalCount, isLoading } = useSelector((state: RBACStore) => ({
users: state.userReducer?.users?.data || [],
groupUsers: state.groupReducer?.selectedGroup?.members?.data || [],
totalCount: state.userReducer?.users?.meta?.count,
isLoading: state.userReducer?.isUserDataLoading,
}));
Expand Down

0 comments on commit 4d273c4

Please sign in to comment.