From c8fd3ffc87664a23e0b37f9770a19129ff51a59f Mon Sep 17 00:00:00 2001 From: Emma-Hyejin Date: Mon, 15 Jan 2024 02:23:13 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20=EB=8C=93=EA=B8=80=20=EC=88=A8=EA=B9=80?= =?UTF-8?q?=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 = "/";