mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-07-28 11:15:43 +08:00
Added TaskCategory enum
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { Box, Flex, GridItem, Heading, SimpleGrid, Text, useColorModeValue } from "@chakra-ui/react";
|
||||
import Link from "next/link";
|
||||
|
||||
import { TaskTypes } from "../Tasks/TaskTypes";
|
||||
import { TaskCategory, TaskTypes } from "../Tasks/TaskTypes";
|
||||
|
||||
const displayTaskCategories = ["create", "evaluate"];
|
||||
const displayTaskCategories = [TaskCategory.Create, TaskCategory.Evaluate];
|
||||
|
||||
export const TaskOption = () => {
|
||||
const backgroundColor = useColorModeValue("white", "gray.700");
|
||||
@@ -12,9 +12,7 @@ export const TaskOption = () => {
|
||||
<Box className="flex flex-col gap-14" fontFamily="inter">
|
||||
{displayTaskCategories.map((category, categoryIndex) => (
|
||||
<div key={categoryIndex}>
|
||||
<Text className="text-2xl font-bold pb-4" style={{ textTransform: "capitalize" }}>
|
||||
{category}
|
||||
</Text>
|
||||
<Text className="text-2xl font-bold pb-4">{TaskCategory[category]}</Text>
|
||||
<SimpleGrid columns={[1, 2, 2, 3, 4]} gap={4}>
|
||||
{TaskTypes.filter((task) => task.category == category).map((item, itemIndex) => (
|
||||
<Link key={itemIndex} href={item.pathname}>
|
||||
|
||||
Reference in New Issue
Block a user