Untitled

mail@pastecode.io avatar
unknown
jsx
2 years ago
877 B
1
Indexable
Never
import { Avatar, Button, Col, Form, Input, List, message, Row } from "antd";
import React, { memo, useEffect, useState } from "react";
import { useParams } from "react-router-dom";
import { DeleteOutlined, EditOutlined, LoadingOutlined } from "@ant-design/icons";
import taskSubjectApi from "../../../api/taskSubjectApi";
import "./index.scss";

const TodoApp = () => {
  const [taskList, setTaskList] = useState([]);
  let params = useParams();

  const fetchTaskList = async () => {
      const response = await taskSubjectApi.getById(params.task_subject_id);
      if (response?.status === "OK") {
        setTaskList(response.data?.taskLists ? response.data.taskLists : []);
      }
      console.log(response);
  };

  useEffect(() => {
    fetchTaskList();
  }, []);

  return (
    <>
      
    </>
  );
};

export default memo(TodoApp);