Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Replace EmptyState with StateNoData component for consistency #2164

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading