Skip to content

Commit

Permalink
refactor: remove isListLoading prop (#980)
Browse files Browse the repository at this point in the history
  • Loading branch information
topliceanurazvan authored Dec 18, 2023
1 parent f1d945a commit eb85a68
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ const EntityView: React.FC<EntityViewBlueprint> = props => {
entity,
initialFiltersState,
isFetching,
isListLoading,
isLoading,
itemKey,
pageDescription,
Expand Down Expand Up @@ -150,12 +149,6 @@ const EntityView: React.FC<EntityViewBlueprint> = props => {
}
}, [isFetching]);

useEffect(() => {
if (!isListLoading) return;

setFirstTimeLoading(true);
}, [isListLoading]);

const DefaultViewComponent: React.FC<ViewComponentBaseProps> = useMemo(
() => componentProps =>
(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,7 @@ import TestSuiteCreationModalContent from './TestSuiteCreationModalContent';

const PageDescription: React.FC = () => <>Explore your test suites at a glance...</>;

interface TestSuitesListProps {
isListLoading?: boolean;
}

const TestSuitesList: React.FC<TestSuitesListProps> = props => {
const {isListLoading} = props;

const TestSuitesList: React.FC = () => {
const isSystemAvailable = useSystemAccess(SystemAccess.system);
const [filters, setFilters] = useTestSuitesField('filters');
const pageTitleAddon = useTestsSlotFirst('testSuitesListTitleAddon');
Expand Down Expand Up @@ -90,7 +84,6 @@ const TestSuitesList: React.FC<TestSuitesListProps> = props => {
isLoading={isLoading || !isSystemAvailable}
isFetching={isFetching}
onAdd={openCreateModal}
isListLoading={isListLoading ?? false}
/>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,7 @@ const PageDescription: React.FC = () => (
</>
);

interface TestsListProps {
isListLoading?: boolean;
}

const TestsList: React.FC<TestsListProps> = props => {
const {isListLoading} = props;

const TestsList: React.FC = () => {
const isSystemAvailable = useSystemAccess(SystemAccess.system);
const [filters, setFilters] = useTestsField('filters');

Expand Down Expand Up @@ -96,7 +90,6 @@ const TestsList: React.FC<TestsListProps> = props => {
isLoading={isLoading || !isSystemAvailable}
isFetching={isFetching}
onAdd={openCreateModal}
isListLoading={isListLoading ?? false}
/>
);
};
Expand Down
1 change: 0 additions & 1 deletion packages/web/src/models/entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export interface EntityViewBlueprint {
entity: Entity;
initialFiltersState: TestFilters | TestSuiteFilters;
isFetching: boolean;
isListLoading: boolean;
isLoading: boolean;
itemKey: string;
pageTitle: string;
Expand Down

0 comments on commit eb85a68

Please sign in to comment.