Skip to content

Commit

Permalink
Replace EmptyState with StateNoData component for consistency
Browse files Browse the repository at this point in the history
Signed-off-by: Maayan Hadasi <[email protected]>
  • Loading branch information
mguetta1 committed Dec 9, 2024
1 parent 9e1b026 commit 9e59ffa
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions client/src/app/pages/tasks/tasks-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ import React, { ReactNode } from "react";
import { useTranslation } from "react-i18next";
import { Link, useHistory } from "react-router-dom";
import {
EmptyState,
EmptyStateHeader,
EmptyStateIcon,
PageSection,
PageSectionVariants,
Text,
Expand All @@ -22,7 +19,6 @@ import {
Td,
ThProps,
} from "@patternfly/react-table";
import { CubesIcon } from "@patternfly/react-icons";

import { FilterToolbar, FilterType } from "@app/components/FilterToolbar";
import {
Expand All @@ -49,6 +45,7 @@ import dayjs from "dayjs";
import { formatPath } from "@app/utils/utils";
import { Paths } from "@app/Paths";
import { TaskActionColumn } from "./TaskActionColumn";
import { StateNoData } from "@app/components/StateNoData";

const taskStateToLabel: Record<TaskState, string> = {
"No task": "taskState.NoTask",
Expand Down Expand Up @@ -317,15 +314,7 @@ export const TasksPage: React.FC = () => {
isLoading={isFetching}
isError={!!fetchError}
isNoData={currentPageItems.length === 0}
noDataEmptyState={
<EmptyState variant="sm">
<EmptyStateHeader
titleText={t("message.noResultsFoundTitle")}
headingLevel="h2"
icon={<EmptyStateIcon icon={CubesIcon} />}
/>
</EmptyState>
}
noDataEmptyState={<StateNoData />}
numRenderedColumns={numRenderedColumns}
>
<Tbody>
Expand Down

0 comments on commit 9e59ffa

Please sign in to comment.