From 0c85e392344cb37a100b421142e781043bb57de8 Mon Sep 17 00:00:00 2001 From: bbung Date: Tue, 16 Jul 2024 21:18:13 +0900 Subject: [PATCH 1/6] =?UTF-8?q?FIX:=20=F0=9F=90=9B=20=20=EB=B6=81=EB=A7=88?= =?UTF-8?q?=ED=81=AC=20=EB=B9=88=20=EC=A0=9C=EB=AA=A9=EC=9D=BC=20=EA=B2=BD?= =?UTF-8?q?=EC=9A=B0=20url=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/RouteGuard.tsx | 1 - src/components/BookmarkCard/index.tsx | 2 +- src/components/BookmarkItem/index.tsx | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/app/RouteGuard.tsx b/src/app/RouteGuard.tsx index 72dc076..b6d0616 100644 --- a/src/app/RouteGuard.tsx +++ b/src/app/RouteGuard.tsx @@ -31,7 +31,6 @@ const RouteGuard = () => { const token = getCookie('accessToken'); if (chrome && chrome.runtime && chrome.runtime.sendMessage) { - console.log(!!token, token ?? ''); chrome.runtime.sendMessage(process.env.NEXT_PUBLIC_EXTENSION_ID, { isLogin: !!token, accessToken: token ?? '', diff --git a/src/components/BookmarkCard/index.tsx b/src/components/BookmarkCard/index.tsx index 163ce14..925e6a9 100644 --- a/src/components/BookmarkCard/index.tsx +++ b/src/components/BookmarkCard/index.tsx @@ -94,7 +94,7 @@ const BookmarkCard = ({ {categoryNames.length > 0 && ( {categoryNames[0]} )} -

{title}

+

{title !== '' ? title : url}

{memo}

diff --git a/src/components/BookmarkItem/index.tsx b/src/components/BookmarkItem/index.tsx index 972734e..c4841e3 100644 --- a/src/components/BookmarkItem/index.tsx +++ b/src/components/BookmarkItem/index.tsx @@ -60,7 +60,7 @@ const BookmarkItem = ({ onClick={onClick} >
-

{title}

+

{title !== '' ? title : url}

{memo}

From 786e4cda49f876a64f2fe14de1e11e2c0b679410 Mon Sep 17 00:00:00 2001 From: bbung Date: Tue, 16 Jul 2024 21:25:37 +0900 Subject: [PATCH 2/6] =?UTF-8?q?FIX:=20=F0=9F=90=9B=20=20=EB=B6=81=EB=A7=88?= =?UTF-8?q?=ED=81=AC=20siteName=20url=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/BookmarkCard/index.tsx | 8 +++++--- src/components/BookmarkItem/index.tsx | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/components/BookmarkCard/index.tsx b/src/components/BookmarkCard/index.tsx index 925e6a9..660dec3 100644 --- a/src/components/BookmarkCard/index.tsx +++ b/src/components/BookmarkCard/index.tsx @@ -42,9 +42,11 @@ const BookmarkCard = ({ useGetThumbnailImage(imageUUID); const { mutateAsync: mutateBookmarkLike } = useBookmarkLike(); - const [isLike, setIsLike] = useState(isFavorite); + const bookmarkTitle = title !== '' ? title : url; + const bookmarkSiteName = siteName !== '' ? siteName : url.split('/')[2]; + // 북마크 좋아요 const handleToggleLike = (e: MouseEvent) => { e.stopPropagation(); @@ -94,7 +96,7 @@ const BookmarkCard = ({ {categoryNames.length > 0 && ( {categoryNames[0]} )} -

{title !== '' ? title : url}

+

{bookmarkTitle}

{memo}

@@ -108,7 +110,7 @@ const BookmarkCard = ({ onError={(e) => ((e.target as HTMLImageElement).src = '/logo.svg')} /> - {siteName} + {bookmarkSiteName}