diff --git a/src/components/common/ListBox.tsx b/src/components/common/ListBox.tsx index b485005..42e0bf1 100644 --- a/src/components/common/ListBox.tsx +++ b/src/components/common/ListBox.tsx @@ -273,7 +273,12 @@ const Time = styled.div` ${(props) => props.theme.fonts.caption2_m}; border-radius: 0px 8px 8px 0px; background: rgba(255, 135, 0, 0.15); - white-space: nowrap; + white-space: normal; + overflow-wrap: break-word; + word-break: break-word; + -webkit-hyphens: auto; + -ms-hyphens: auto; + hyphens: auto; &.mint { color: ${theme.colors.sub_mint}; background: rgba(5, 206, 194, 0.15); diff --git a/src/components/common/Popup.tsx b/src/components/common/Popup.tsx index 24f945b..3d069da 100644 --- a/src/components/common/Popup.tsx +++ b/src/components/common/Popup.tsx @@ -98,11 +98,13 @@ const Title = styled.div` position: sticky; top: 0; background: ${theme.colors.white}; - z-index: 1; + z-index: 100; `; const TitleBox = styled.div` width: 100%; + background: ${theme.colors.white}; + z-index: 100; `; const ImageBox = styled.div` diff --git a/src/components/home/AddTodoPopup.tsx b/src/components/home/AddTodoPopup.tsx index 934f31d..ecc9bfe 100644 --- a/src/components/home/AddTodoPopup.tsx +++ b/src/components/home/AddTodoPopup.tsx @@ -1,19 +1,20 @@ import { theme } from "@/styles/theme"; import styled from "styled-components"; -import { useState } from "react"; +import { useEffect, useState } from "react"; import Button from "../common/Button"; import CustomInput from "../common/CustomInput"; import Popup from "../common/Popup"; import Calendar from "../common/Calendar"; import Axios from "@/apis/axios"; - -export const categories = [ - { value: "SCHOOL_ANNOUNCEMENT", label: "가정통신문" }, - { value: "HOMEWORK", label: "숙제" }, - { value: "SUPPLY", label: "준비물" }, - { value: "ETC", label: "기타" }, - { value: "NONE", label: "없음" }, -]; +import { + addTodoMessage, + calendarPlaceHolder, + categories, + LanguageKeys, + submitMessage, + todoPlaceHolder, + whenTodoMessage, +} from "@/data/todoData"; interface AddTodoPopupProps { onClose: () => void; @@ -32,6 +33,11 @@ const AddTodoPopup = ({ const [category, setCategory] = useState(""); const [selectedDate, setSelectedDate] = useState(""); const isButtonEnabled = todo !== "" && category !== "" && selectedDate !== ""; + const [language, setLanguage] = useState("ko"); + + useEffect(() => { + setLanguage(localStorage.getItem("language") || "ko"); + }, []); const handleCategoryChange = (value: string) => { setCategory(value); @@ -70,10 +76,14 @@ const AddTodoPopup = ({ return ( <> - + setTodo(value)} /> @@ -83,16 +93,20 @@ const AddTodoPopup = ({ selected={category === categoryItem.value} onClick={() => handleCategoryChange(categoryItem.value)} > - {categoryItem.label} + {categoryItem.label[language as LanguageKeys]} ))} - 언제까지 할 일인가요? - + {whenTodoMessage[language as keyof typeof whenTodoMessage]} +