From 9b0ea1488bdbd13e85518630f25b4d31f6d7e8c4 Mon Sep 17 00:00:00 2001 From: Emma-Hyejin <110151638+Emma-Hyejin@users.noreply.github.com> Date: Mon, 15 Jan 2024 01:24:04 +0900 Subject: [PATCH 1/2] Update index.html --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index a839047..bdeda2b 100644 --- a/index.html +++ b/index.html @@ -7,8 +7,8 @@ - - + + TRIPTRIP From c8fd3ffc87664a23e0b37f9770a19129ff51a59f Mon Sep 17 00:00:00 2001 From: Emma-Hyejin Date: Mon, 15 Jan 2024 02:23:13 +0900 Subject: [PATCH 2/2] =?UTF-8?q?Fix:=20=EB=8C=93=EA=B8=80=20=EC=88=A8?= =?UTF-8?q?=EA=B9=80=20=EB=B6=80=EB=B6=84=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 24 +++++++++++--- src/common/tag/RecoilTag.tsx | 4 +-- src/components/comment/Comment.tsx | 8 ++++- src/components/comment/CommentItem.tsx | 19 +++++++++-- src/components/comment/HideComment.tsx | 46 +++++++++++++++----------- src/components/header/Header.tsx | 5 +-- 6 files changed, 75 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 30e5968..fbbebdd 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # 🏖️ TRIPTRIP -**`프로젝트 소개`** 네이버 쇼핑 여행 상품을 소개 및 연결하고 여행지 후기 커뮤니티를 이용할 수 있는 서비스를 제공하는 사이트입니다. +**`프로젝트 소개`** 국내 여행지 관련 네이버 상품 API를 활요한 여행 상품 소개 및 커뮤니티 사이트 -**`개발기간`** 2023.11.27 - 2023.12.22 +**`개발기간`** 2023.11.27 - 2023.12.29 (5주) -**`배포링크`** +**`배포링크`** [**TRIPTRIP**](https://triptrip.site/)
@@ -21,13 +21,16 @@ +
+ +

## 🧑‍💻 프론트엔드 멤버구성 -**조혜진 :** 여행 포럼 CRUD, 마이페이지, 실시간 알림, 검색 +**조혜진 :** 여행 포럼 CRUD, 마이페이지, 실시간 알림, 검색, AWS 배포 **박효정 :** 회원가입, 로그인, Oauth, 상품 CRUD @@ -40,3 +43,16 @@ - 뚜벅이 여행자들을 위한 고속버스 시간표 보기 - 이미 다녀온 선배 여행자들의 여행 후기 커뮤니티 - 관심있는 여행지 상품 새 등록 시 실시간 알림 +- 마이페이지에서 프로필 수정 및 관심 태그 설정 +- 반응형 웹 페이지 +- 다크모드, 라이트 모드 + +
+ +## 👤 유저 플로우 +
+
+
+ +[** Firma 링크 연결](https://www.figma.com/file/hYVTH99DZpDE7XYoRqB8jt/userflow?type=whiteboard&t=86t69VdYqx2Rkdtp-1) + diff --git a/src/common/tag/RecoilTag.tsx b/src/common/tag/RecoilTag.tsx index 503d65d..dd8ed51 100644 --- a/src/common/tag/RecoilTag.tsx +++ b/src/common/tag/RecoilTag.tsx @@ -65,8 +65,8 @@ const RecoilTag = ({
diff --git a/src/components/comment/Comment.tsx b/src/components/comment/Comment.tsx index f850b40..c5bc1f2 100644 --- a/src/components/comment/Comment.tsx +++ b/src/components/comment/Comment.tsx @@ -43,6 +43,7 @@ const Comment = () => { const handleHideComment = (commentId: number) => { setIsHide(!isHide); setShowComment(commentId); + // console.log(`comment ${commentId}`); }; const getComments = async () => { @@ -92,6 +93,7 @@ const Comment = () => { isHide={isHide} setIsHide={() => handleHideComment(comment.commentId)} type={"origin"} + showComment={showComment} /> {isHide && comment.children !== null && @@ -102,7 +104,11 @@ const Comment = () => { className="flex flex-row justify-between px-2 ml-10 " > - +
)) : null} diff --git a/src/components/comment/CommentItem.tsx b/src/components/comment/CommentItem.tsx index 1a05683..ba032cd 100644 --- a/src/components/comment/CommentItem.tsx +++ b/src/components/comment/CommentItem.tsx @@ -11,21 +11,32 @@ interface CommentItems { datas: CommentTypes; isHide?: boolean; setIsHide?: () => void; + showComment: number | null; type: "origin" | "child"; } -const CommentItem = ({ datas, isHide, setIsHide, type }: CommentItems) => { +const CommentItem = ({ + datas, + isHide, + setIsHide, + type, + showComment, +}: CommentItems) => { const [isEdit, setIsEdit] = useState(false); const [is2CHide, setIs2CHide] = useState(false); const [editCommitId, setEditCommentId] = useState(null); + // const [reHcommentId, setReHcommentId] = useState(null); const MEMBER_ID = window.localStorage.getItem("memberId"); //임시 - //console.log(datas); + // console.log(datas); const formattedDate = useFormatDate(datas.createdAt); const handle2CHide = (commentId: number) => { setEditCommentId(commentId); setIs2CHide(!is2CHide); }; + // const handleReCHide = (reCommentId: number) => { + // setReHcommentId(reCommentId) + // } //css const bgClass = @@ -87,9 +98,11 @@ const CommentItem = ({ datas, isHide, setIsHide, type }: CommentItems) => { {datas.children !== null && datas.children.length !== 0 ? ( void} + setIsHide={setIsHide as () => void} + showComment={showComment} isLength={datas.children.length} key={`comment-showComment-${datas.commentId}`} + curId={datas.commentId} /> ) : ( <> diff --git a/src/components/comment/HideComment.tsx b/src/components/comment/HideComment.tsx index be4ba98..2b1b1e1 100644 --- a/src/components/comment/HideComment.tsx +++ b/src/components/comment/HideComment.tsx @@ -3,31 +3,39 @@ import ArrowUp from "@/assets/svg/ArrowUp"; export interface hideTypes { isHide: boolean; - onClick: () => void; + setIsHide: () => void; + showComment: number | null; isLength?: null | number; + curId: number | null; } -const HideComment = ({ isHide, onClick, isLength }: hideTypes) => { +const HideComment = ({ + isHide, + setIsHide, + isLength, + showComment, + curId, +}: hideTypes) => { + // console.log(`HideComment ${curId}`); + const textStyle = "text-sm text-ETC_COLOR hover:font-semibold cursor-pointer flex flex-row items-center"; - if (isHide === true) { - return ( - - ); - } - - if (isHide === false) { - return ( - - ); - } + return ( + + ); }; export default HideComment; diff --git a/src/components/header/Header.tsx b/src/components/header/Header.tsx index b195a83..e771b53 100644 --- a/src/components/header/Header.tsx +++ b/src/components/header/Header.tsx @@ -50,9 +50,10 @@ const Header = () => { //로그아웃 클릭 핸들 const handleLogOut = () => { - // localStorage.removeItem("access_token"); + localStorage.removeItem("access_token"); + localStorage.removeItem("memberId"); // localStorage.removeItem(""); - localStorage.clear(); + // localStorage.clear(); setIsLogin({ loginState: false }); setIsNotifiOpen(false); window.location.href = "/";