From 4f50db40530515b4fcb2d43218909d059bd6b097 Mon Sep 17 00:00:00 2001 From: Soap Date: Mon, 2 Dec 2024 23:27:05 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EA=B8=B0=EC=A1=B4=20=EC=8D=B8=EB=84=A4?= =?UTF-8?q?=EC=9D=BC=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EC=82=AC?= =?UTF-8?q?=EC=9A=A9=EC=B2=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #preview --- .../src/components/Map/MapDetailBoard.tsx | 4 +-- .../common/List/Course/CourseListPanel.tsx | 4 ++- .../src/components/common/List/ListItem.tsx | 26 ++++++++++--------- .../common/List/ListItemThumbnail.tsx | 6 ++--- .../common/List/ListToggleButtons.tsx | 8 +++--- frontend/src/components/common/SearchBar.tsx | 3 +-- frontend/src/pages/HomePage/Header.tsx | 15 ++++++----- frontend/src/pages/HomePage/LogOutButton.tsx | 5 ++-- frontend/src/pages/HomePage/LoginButtons.tsx | 5 ++-- frontend/src/pages/HomePage/MainListPanel.tsx | 2 +- frontend/src/pages/HomePage/UserProfile.tsx | 3 +-- .../src/pages/SearchPage/SearchListPanel.tsx | 2 +- 12 files changed, 44 insertions(+), 39 deletions(-) diff --git a/frontend/src/components/Map/MapDetailBoard.tsx b/frontend/src/components/Map/MapDetailBoard.tsx index a6a997af..e6418f9f 100644 --- a/frontend/src/components/Map/MapDetailBoard.tsx +++ b/frontend/src/components/Map/MapDetailBoard.tsx @@ -10,7 +10,7 @@ import SideContainer from '@/components/common/SideContainer'; import Marker from '@/components/Marker/Marker'; import DeleteMapButton from './DeleteMapButton'; import EditMapButton from './EditMapButton'; -import MapThumbnail from './MapThumbnail'; +import ListItemThumbnail from '@/components/common/List/ListItemThumbnail'; type MapDetailBoardProps = { mapData: Map; @@ -54,7 +54,7 @@ const MapDetailBoard = ({ mapData }: MapDetailBoardProps) => { )} {mapData.thumbnailUrl.startsWith('https://example') ? ( - + ) : ( )} diff --git a/frontend/src/components/common/List/Course/CourseListPanel.tsx b/frontend/src/components/common/List/Course/CourseListPanel.tsx index 35fbd67b..2423688a 100644 --- a/frontend/src/components/common/List/Course/CourseListPanel.tsx +++ b/frontend/src/components/common/List/Course/CourseListPanel.tsx @@ -28,7 +28,9 @@ const CourseListPanel: React.FC = ({ query }) => { } + renderItem={(course) => ( + + )} className="max-h-[700px] p-5" /> ); diff --git a/frontend/src/components/common/List/ListItem.tsx b/frontend/src/components/common/List/ListItem.tsx index 37f3347e..05a54d49 100644 --- a/frontend/src/components/common/List/ListItem.tsx +++ b/frontend/src/components/common/List/ListItem.tsx @@ -8,20 +8,22 @@ type ListItemProps = { linkPrefix: string; }; -const ListItem = ({ - item, - linkPrefix, - }: ListItemProps) => { +const ListItem = < + T extends { + id: number; + title: string; + thumbnailUrl: string; + user: { profileImageUrl: string; nickname: string }; + pinCount: number; + }, +>({ + item, + linkPrefix, +}: ListItemProps) => { return ( -
-
+
+
{item.thumbnailUrl.startsWith('https://example') ? ( ) : ( diff --git a/frontend/src/components/common/List/ListItemThumbnail.tsx b/frontend/src/components/common/List/ListItemThumbnail.tsx index 88fc5b9e..d5750740 100644 --- a/frontend/src/components/common/List/ListItemThumbnail.tsx +++ b/frontend/src/components/common/List/ListItemThumbnail.tsx @@ -4,9 +4,9 @@ type ListItemThumbnailProps = { }; const ListItemThumbnail = ({ - thumbnailUrl = `https://kr.object.ncloudstorage.com/ogil-public/uploads/default_thumbnail/default_3.webp`, - className, - }: ListItemThumbnailProps) => { + thumbnailUrl = `https://kr.object.ncloudstorage.com/ogil-public/uploads/default_thumbnail/default_3.webp`, + className, +}: ListItemThumbnailProps) => { return (
썸네일 diff --git a/frontend/src/components/common/List/ListToggleButtons.tsx b/frontend/src/components/common/List/ListToggleButtons.tsx index d316cb09..7b379313 100644 --- a/frontend/src/components/common/List/ListToggleButtons.tsx +++ b/frontend/src/components/common/List/ListToggleButtons.tsx @@ -7,10 +7,10 @@ interface ToggleButtonProps { } const ToggleButton: React.FC = ({ - options, - selected, - onSelect, - }) => { + options, + selected, + onSelect, +}) => { return (
= ({ onSearch, query }) => { }; return ( -
+
{ return (
- Logo { - window.location.href = '/'; - }}> - + Logo { + window.location.href = '/'; + }} + > Loading...
}> diff --git a/frontend/src/pages/HomePage/LogOutButton.tsx b/frontend/src/pages/HomePage/LogOutButton.tsx index 16faa2ce..7215d583 100644 --- a/frontend/src/pages/HomePage/LogOutButton.tsx +++ b/frontend/src/pages/HomePage/LogOutButton.tsx @@ -10,8 +10,9 @@ const LogOutButton = () => { }; return ( ); diff --git a/frontend/src/pages/HomePage/LoginButtons.tsx b/frontend/src/pages/HomePage/LoginButtons.tsx index 661ce26f..648dcd1f 100644 --- a/frontend/src/pages/HomePage/LoginButtons.tsx +++ b/frontend/src/pages/HomePage/LoginButtons.tsx @@ -49,8 +49,9 @@ const LoginButtons = () => { {!isLogged ? (
diff --git a/frontend/src/pages/HomePage/MainListPanel.tsx b/frontend/src/pages/HomePage/MainListPanel.tsx index a0df2901..30473cc2 100644 --- a/frontend/src/pages/HomePage/MainListPanel.tsx +++ b/frontend/src/pages/HomePage/MainListPanel.tsx @@ -18,7 +18,7 @@ const MainListPanel = () => { onSelect={(value) => setListTab(value as CreateMapType)} /> -
+
{listTab === 'MAP' ? : }
diff --git a/frontend/src/pages/HomePage/UserProfile.tsx b/frontend/src/pages/HomePage/UserProfile.tsx index ea2c041d..4b2e05a9 100644 --- a/frontend/src/pages/HomePage/UserProfile.tsx +++ b/frontend/src/pages/HomePage/UserProfile.tsx @@ -6,8 +6,7 @@ type UserProfileProps = { const UserProfile = ({ user }: UserProfileProps) => { return ( -
+
{`${user.nickname}님의 = ({ query }) => { onSelect={(value) => setListTab(value as CreateMapType)} /> -
+
{listTab === 'MAP' ? ( ) : (