Implement new TaskEmptyState component

This commit is contained in:
klotske
2023-01-11 23:39:55 +03:00
parent 9a00e938bd
commit 0eed9b5126
10 changed files with 20 additions and 20 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
import { Container } from "@chakra-ui/react";
import Head from "next/head";
import { TaskEmptyState } from "src/components/EmptyState";
import { LoadingScreen } from "src/components/Loading/LoadingScreen";
import { Task } from "src/components/Tasks/Task";
import { useCreateAssistantReply } from "src/hooks/tasks/useCreateReply";
@@ -12,7 +12,7 @@ const AssistantReply = () => {
}
if (tasks.length === 0) {
return <Container className="p-6 text-center text-gray-800">No tasks found...</Container>;
return <TaskEmptyState />;
}
return (
+2 -2
View File
@@ -1,5 +1,5 @@
import { Container } from "@chakra-ui/react";
import Head from "next/head";
import { TaskEmptyState } from "src/components/EmptyState";
import { LoadingScreen } from "src/components/Loading/LoadingScreen";
import { Task } from "src/components/Tasks/Task";
import { useCreateInitialPrompt } from "src/hooks/tasks/useCreateReply";
@@ -12,7 +12,7 @@ const InitialPrompt = () => {
}
if (tasks.length === 0) {
return <Container className="p-6 text-center text-gray-800">No tasks found...</Container>;
return <TaskEmptyState />;
}
return (
+2 -2
View File
@@ -1,5 +1,5 @@
import Head from "next/head";
import { Container } from "src/components/Container";
import { TaskEmptyState } from "src/components/EmptyState";
import { LoadingScreen } from "src/components/Loading/LoadingScreen";
import { Task } from "src/components/Tasks/Task";
import { useCreatePrompterReply } from "src/hooks/tasks/useCreateReply";
@@ -12,7 +12,7 @@ const UserReply = () => {
}
if (tasks.length === 0) {
return <Container className="p-6 text-center text-gray-800">No tasks found...</Container>;
return <TaskEmptyState />;
}
return (
@@ -1,5 +1,5 @@
import Head from "next/head";
import { Container } from "src/components/Container";
import { TaskEmptyState } from "src/components/EmptyState";
import { LoadingScreen } from "src/components/Loading/LoadingScreen";
import { Task } from "src/components/Tasks/Task";
import { useRankAssistantRepliesTask } from "src/hooks/tasks/useRankReplies";
@@ -12,7 +12,7 @@ const RankAssistantReplies = () => {
}
if (tasks.length === 0) {
return <Container className="p-6 text-center">No tasks found...</Container>;
return <TaskEmptyState />;
}
return (
@@ -1,5 +1,5 @@
import Head from "next/head";
import { Container } from "src/components/Container";
import { TaskEmptyState } from "src/components/EmptyState";
import { LoadingScreen } from "src/components/Loading/LoadingScreen";
import { Task } from "src/components/Tasks/Task";
import { useRankInitialPromptsTask } from "src/hooks/tasks/useRankReplies";
@@ -12,7 +12,7 @@ const RankInitialPrompts = () => {
}
if (tasks.length === 0) {
return <Container className="p-6 text-center">No tasks found...</Container>;
return <TaskEmptyState />;
}
return (
@@ -1,5 +1,5 @@
import Head from "next/head";
import { Container } from "src/components/Container";
import { TaskEmptyState } from "src/components/EmptyState";
import { LoadingScreen } from "src/components/Loading/LoadingScreen";
import { Task } from "src/components/Tasks/Task";
import { useRankPrompterRepliesTask } from "src/hooks/tasks/useRankReplies";
@@ -12,7 +12,7 @@ const RankUserReplies = () => {
}
if (tasks.length === 0) {
return <Container className="p-6 text-center">No tasks found...</Container>;
return <TaskEmptyState />;
}
return (
@@ -1,5 +1,5 @@
import { Container } from "@chakra-ui/react";
import Head from "next/head";
import { TaskEmptyState } from "src/components/EmptyState";
import { LoadingScreen } from "src/components/Loading/LoadingScreen";
import { Task } from "src/components/Tasks/Task";
import { useLabelAssistantReplyTask } from "src/hooks/tasks/useLabelingTask";
@@ -12,7 +12,7 @@ const LabelAssistantReply = () => {
}
if (tasks.length === 0) {
return <Container className="p-6 text-center text-gray-800">No tasks found...</Container>;
return <TaskEmptyState />;
}
return (
@@ -1,5 +1,5 @@
import { Container } from "@chakra-ui/react";
import Head from "next/head";
import { TaskEmptyState } from "src/components/EmptyState";
import { LoadingScreen } from "src/components/Loading/LoadingScreen";
import { Task } from "src/components/Tasks/Task";
import { useLabelInitialPromptTask } from "src/hooks/tasks/useLabelingTask";
@@ -12,7 +12,7 @@ const LabelInitialPrompt = () => {
}
if (tasks.length === 0) {
return <Container className="p-6 text-center text-gray-800">No tasks found...</Container>;
return <TaskEmptyState />;
}
return (
@@ -1,5 +1,5 @@
import { Container } from "@chakra-ui/react";
import Head from "next/head";
import { TaskEmptyState } from "src/components/EmptyState";
import { LoadingScreen } from "src/components/Loading/LoadingScreen";
import { Task } from "src/components/Tasks/Task";
import { useLabelPrompterReplyTask } from "src/hooks/tasks/useLabelingTask";
@@ -12,7 +12,7 @@ const LabelPrompterReply = () => {
}
if (tasks.length === 0) {
return <Container className="p-6 text-center text-gray-800">No tasks found...</Container>;
return <TaskEmptyState />;
}
return (
+2 -2
View File
@@ -1,5 +1,5 @@
import { Container } from "@chakra-ui/react";
import Head from "next/head";
import { TaskEmptyState } from "src/components/EmptyState";
import { LoadingScreen } from "src/components/Loading/LoadingScreen";
import { Task } from "src/components/Tasks/Task";
import { useGenericTaskAPI } from "src/hooks/tasks/useGenericTaskAPI";
@@ -12,7 +12,7 @@ const RandomTask = () => {
}
if (tasks.length === 0) {
return <Container className="p-6 text-center text-gray-800">No tasks found...</Container>;
return <TaskEmptyState />;
}
return (