From 1d2b0c398651de96d0159e2b59acdd7af8d1c552 Mon Sep 17 00:00:00 2001 From: HyunJinNo Date: Fri, 27 Sep 2024 21:00:44 +0900 Subject: [PATCH 1/2] =?UTF-8?q?Feat:=20=EC=A0=95=EB=B3=B4=20=EA=B2=80?= =?UTF-8?q?=EC=83=89=20=EC=8B=9C=20=EC=95=84=EB=AC=B4=20=EA=B2=83=EB=8F=84?= =?UTF-8?q?=20=EC=9E=85=EB=A0=A5=ED=95=98=EC=A7=80=20=EC=95=8A=EC=9D=84=20?= =?UTF-8?q?=EB=95=8C=20=EC=A0=84=EC=B2=B4=20=EA=B2=80=EC=83=89=20=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../list/InformationSearchContainer.tsx | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/containers/informations/list/InformationSearchContainer.tsx b/src/containers/informations/list/InformationSearchContainer.tsx index 912c3481..d5946c0d 100644 --- a/src/containers/informations/list/InformationSearchContainer.tsx +++ b/src/containers/informations/list/InformationSearchContainer.tsx @@ -7,17 +7,16 @@ import { usePathname, useRouter, useSearchParams } from "next/navigation"; import { useState } from "react"; const InformationSearchContainer = () => { - const [modalVisible, setModalVisible] = useState(false); - const [orderDropdownVisible, setOrderDropdownVisible] = - useState(false); + const [modalVisible, setModalVisible] = useState(false); + const [orderDropdownVisible, setOrderDropdownVisible] = useState(false); const pathname = usePathname(); const searchParams = useSearchParams(); const parentCategoryId = searchParams.get("parentCategoryId")!; const childCategoryId = searchParams.get("childCategoryId"); const place = searchParams.get("place") ?? ""; const order = searchParams.get("order") ?? "latest"; - const [searchValue, setSearchValue] = useState(""); - const [searchMethod, setSearchMethod] = useState("제목"); + const [searchValue, setSearchValue] = useState(""); + const [searchMethod, setSearchMethod] = useState("제목"); const [searchDropdownVisible, setSearchDropdownVisible] = useState(false); const router = useRouter(); @@ -34,12 +33,7 @@ const InformationSearchContainer = () => { }; const onSearchClick = () => { - if (searchMethod === "제목" && searchValue.length < 1) { - alert("최소 한 글자의 제목을 입력해 주세요."); - return; - } - - if (searchMethod === "태그" && searchValue.length < 2) { + if (searchMethod === "태그" && searchValue.length === 1) { alert("2 ~ 15자의 태그를 입력해 주세요."); return; } From e8af9a4f66a9d481da1f19089dd35efbbae76033 Mon Sep 17 00:00:00 2001 From: HyunJinNo Date: Fri, 27 Sep 2024 21:09:56 +0900 Subject: [PATCH 2/2] =?UTF-8?q?Refactor:=20=EC=97=AC=ED=96=89=EC=9D=BC?= =?UTF-8?q?=EA=B8=B0=20=EC=B9=B4=EB=93=9C=20=EC=95=9E=EB=A9=B4=EC=9D=98=20?= =?UTF-8?q?=EC=A0=9C=EB=AA=A9=20=ED=81=B4=EB=A6=AD=20=EC=8B=9C=20=EC=83=81?= =?UTF-8?q?=EC=84=B8=20=ED=8E=98=EC=9D=B4=EC=A7=80=EB=A1=9C=20=EC=9D=B4?= =?UTF-8?q?=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/diary/list/DiaryCard.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/diary/list/DiaryCard.tsx b/src/components/diary/list/DiaryCard.tsx index f6fd5261..836a877a 100644 --- a/src/components/diary/list/DiaryCard.tsx +++ b/src/components/diary/list/DiaryCard.tsx @@ -137,7 +137,13 @@ const DiaryCard = ({ diaryData, flag, isFlipped, flip }: Props) => { whileInView={{ opacity: 1 }} transition={{ delay: 0.3 }} > -

{diaryData.title}

+ e.stopPropagation()} + > + {diaryData.title} +

{`${new Date(new Date(diaryData.startDatetime).getTime() + 1000 * 60 * 60 * 24).toLocaleDateString("ko-KR")}`}