+ {selectedDate.toISOString().slice(0, 10)}
+
+
+
+ 제목
+
+
+
+
+ 시간
+
+
+
+ 오전
+
+
+ 오후
+
+
+
+ 시
+
+ 분
+
+
+
+
+ 취소
+
+ 추가
+
+
+
+ );
+};
+
+UpdateTodoListModal.propTypes = {
+ setIsAddModalOpen: PropTypes.func.isRequired,
+ selectedDate: PropTypes.string.isRequired,
+ updateTodoList: PropTypes.func,
+};
+
+export default UpdateTodoListModal;
diff --git a/src/components/TodayILearn/OptionTIL.jsx b/src/components/TodayILearn/OptionTIL.jsx
index db58f4c..b9181c8 100644
--- a/src/components/TodayILearn/OptionTIL.jsx
+++ b/src/components/TodayILearn/OptionTIL.jsx
@@ -52,7 +52,7 @@ const FontStyle = styled.div`
margin-right: 1vh;
`;
-const OptionTIL = ({ setPart }) => {
+const OptionTIL = ({ part, setPart }) => {
const [buttonStates, setButtonStates] = useState({
figma: false,
spring: false,
@@ -100,6 +100,7 @@ const OptionTIL = ({ setPart }) => {
setPart('');
break;
}
+ console.log(part);
};
return (
@@ -168,6 +169,7 @@ const OptionTIL = ({ setPart }) => {
};
OptionTIL.propTypes = {
+ part: PropTypes.string,
setPart: PropTypes.func.isRequired,
};
diff --git a/src/pages/ToDoList/TodoList.jsx b/src/pages/ToDoList/TodoList.jsx
index da1db4d..9c0d133 100644
--- a/src/pages/ToDoList/TodoList.jsx
+++ b/src/pages/ToDoList/TodoList.jsx
@@ -11,9 +11,10 @@ import styled from 'styled-components';
import TitleTDL from 'components/ToDoList/TitleTDL';
import ToDoListCalender from 'components/ToDoList/Calender';
import TDLComponent from 'components/ToDoList/ComponentTDL';
-import TodoListModal from 'components/ToDoList/TodoListModal';
+import AddTodoListModal from 'components/ToDoList/AddTodoListModal';
import AddButtonImg from 'assets/todayilearn/addbutton.svg';
+import UpdateTodoListModal from 'components/ToDoList/UpdateTodoListModal';
const Overlay = styled.div`
position: fixed;
@@ -68,7 +69,8 @@ const SVGImage = styled.img`
const TodoList = () => {
const [selectedDate, setSelectedDate] = useState(new Date());
const [todoListData, setTodoListData] = useState([]);
- const [isModalOpen, setIsModalOpen] = useState(false);
+ const [isAddModalOpen, setIsAddModalOpen] = useState(false);
+ const [isUpdateModalOpen, setIsUpdateModalOpen] = useState(false);
const formatDate = (dateString) => {
const dateObject = new Date(dateString);
@@ -83,7 +85,7 @@ const TodoList = () => {
const formattedDate = formatDate(selectedDate);
const handleAddButton = () => {
- setIsModalOpen(true);
+ setIsAddModalOpen(true);
};
useEffect(() => {
@@ -124,14 +126,24 @@ const TodoList = () => {
/>
)}
- {isModalOpen && (
+ {isAddModalOpen && (
<>