diff --git a/public/images/cat .glb b/public/cat.glb similarity index 100% rename from public/images/cat .glb rename to public/cat.glb diff --git a/src/components/Cat.tsx b/src/components/Cat.tsx index 2614d24..e25d2e0 100644 --- a/src/components/Cat.tsx +++ b/src/components/Cat.tsx @@ -3,7 +3,7 @@ import { useFrame } from "@react-three/fiber"; import { useRef } from "react"; const Cat = () => { - const { scene, animations } = useGLTF("cat.glb"); + const { scene, animations } = useGLTF("/cat.glb"); const ref = useRef(); const { actions } = useAnimations(animations, ref); console.log(scene); diff --git a/src/components/DatePick.tsx b/src/components/DatePick.tsx index a0cd025..9525ecd 100644 --- a/src/components/DatePick.tsx +++ b/src/components/DatePick.tsx @@ -2,7 +2,7 @@ import { useState } from "react"; import DatePicker from "react-datepicker"; import "react-datepicker/dist/react-datepicker.css"; -const DatePickerComponent = () => { +const DatePick = () => { const [selectedDate, setSelectedDate] = useState(); return ( @@ -18,4 +18,4 @@ const DatePickerComponent = () => { /> ); }; -export default DatePickerComponent; +export default DatePick; diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 9050647..10b4f1a 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -8,15 +8,15 @@ export const Header = () => { sx={{ backgroundColor: "#fffff0", width: "100%", - height: "13vh", + height: "6vh", margin: "0 0", }} > nyan.gif ); diff --git a/src/components/Request.tsx b/src/components/Request.tsx index f671351..6752770 100644 --- a/src/components/Request.tsx +++ b/src/components/Request.tsx @@ -55,12 +55,13 @@ export default function Request() { cat close.png diff --git a/src/components/TodoView.tsx b/src/components/TodoView.tsx new file mode 100644 index 0000000..d9b2df3 --- /dev/null +++ b/src/components/TodoView.tsx @@ -0,0 +1,56 @@ +import { Task } from "@/types/schema"; +import Checkbox from "@mui/material/Checkbox"; +import List from "@mui/material/List"; +import ListItem from "@mui/material/ListItem"; +import ListItemButton from "@mui/material/ListItemButton"; +import ListItemIcon from "@mui/material/ListItemIcon"; +import ListItemText from "@mui/material/ListItemText"; +import axios from "axios"; +import { useEffect, useState } from "react"; +import { CustomDate } from "./common/CustomDate"; + +export default function TodoView() { + const [tasks, setTasks] = useState([]); + + useEffect(() => { + const getTasks = async () => { + try { + const token = localStorage.getItem("jwt"); + console.log(token); + const response = await axios.get( + `${process.env.NEXT_PUBLIC_BACKEND_URL}/api/v1/task/my`, + { headers: { Authorization: `Bearer ${token}` } } + ); + setTasks(response.data.tasks); + } catch (error) { + console.log(error); + } + }; + getTasks(); + }, []); + + return ( + + {tasks.map(({ id, comment, dead_line, finished_at }) => { + return ( + + + + + + + + + + ); + })} + + ); +} diff --git a/src/pages/todo.tsx b/src/pages/todo.tsx index ffe9be6..818cc13 100644 --- a/src/pages/todo.tsx +++ b/src/pages/todo.tsx @@ -1,11 +1,20 @@ -import { TodoAdd } from "@/components/Todoadd"; +import Cat from "@/components/Cat"; import { ScheduleCalendar } from "@/components/schedule/ScheduleCalender"; +import { TodoAdd } from "@/components/Todoadd"; +import TodoView from "@/components/TodoView"; import { Box, Stack } from "@mui/material"; -// import DataPicker from "../components/DataPicker"; +import { OrbitControls } from "@react-three/drei"; +import { Canvas } from "@react-three/fiber"; export default function Todo() { return ( - + + + + + + + */} + );