From 081c1b18f259e2925dc1a580fdfd7c9d1a114db2 Mon Sep 17 00:00:00 2001 From: Photogrammer Date: Fri, 6 Oct 2023 12:05:24 +0900 Subject: [PATCH 1/8] =?UTF-8?q?[fix]:=20=EB=B0=B0=EB=84=88=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 링크 새탭 처리 - 배너 모바일 환경 ml 변경 - 배너 이미지 없는 경우에도 받도록 처리 --- 42manito/src/Types/Banners/Banner.dto.tsx | 4 +-- 42manito/src/components/Banners/Banners.tsx | 24 +-------------- 42manito/src/components/Banners/TopBanner.tsx | 29 +++++++++++-------- 42manito/src/pages/Mentorings/index.tsx | 12 ++++---- 42manito/src/styles/banner.css | 4 +-- 5 files changed, 28 insertions(+), 45 deletions(-) diff --git a/42manito/src/Types/Banners/Banner.dto.tsx b/42manito/src/Types/Banners/Banner.dto.tsx index 11479352..bb27cd82 100644 --- a/42manito/src/Types/Banners/Banner.dto.tsx +++ b/42manito/src/Types/Banners/Banner.dto.tsx @@ -5,6 +5,6 @@ export interface BannerDto { link: string; // image link backgroundColor: string; // backgroundColor textColor: string; // textColor - image: string; // image - license: string; // license + image?: string; // image + license?: string; // license } diff --git a/42manito/src/components/Banners/Banners.tsx b/42manito/src/components/Banners/Banners.tsx index 2f251f67..dc76d59e 100644 --- a/42manito/src/components/Banners/Banners.tsx +++ b/42manito/src/components/Banners/Banners.tsx @@ -3,33 +3,11 @@ export const BannersData = [ head: "가이드", title: "마니또가 처음이신가요?", description: "가이드와 함께 멘토링을 시작해보세요!", - link: "/Guide", + link: "https://github.com/manito42/guide/wiki", backgroundColor: "bg-signature_color-500", textColor: "text-white", image: "/guide.png", license: "https://kor.pngtree.com/freepng/meb-map-guide_4462396.html' 의 PNG 이미지 kor.pngtree.com", }, - { - head: "가이드222", - title: "마니또가 처음이신가요?", - description: "가이드와 함께 멘토링을 시작해보세요!", - link: "/Guide", - backgroundColor: "bg-pink-500", - textColor: "text-white", - image: "/guide.png", - license: - "https://kor.pngtree.com/freepng/meb-map-guide_4462396.html' 의 PNG 이미지 kor.pngtree.com", - }, - { - head: "가이드333", - title: "마니또가 처음이신가요?", - description: "가이드와 함께 멘토링을 시작해보세요!", - link: "/Guide", - backgroundColor: "bg-blue-500", - textColor: "text-white", - image: "/guide.png", - license: - "https://kor.pngtree.com/freepng/meb-map-guide_4462396.html' 의 PNG 이미지 kor.pngtree.com", - }, ]; diff --git a/42manito/src/components/Banners/TopBanner.tsx b/42manito/src/components/Banners/TopBanner.tsx index 9f96ce10..22e9d961 100644 --- a/42manito/src/components/Banners/TopBanner.tsx +++ b/42manito/src/components/Banners/TopBanner.tsx @@ -14,7 +14,8 @@ export default function TopBanner({ banner }: props) { const router = useRouter(); const [currentIndex, setCurrentIndex] = useState(0); const handleBannerClick = () => { - router.push(banner[currentIndex].link); + // 새 탭으로 열기 + window.open(banner[currentIndex].link, "_blank"); }; const [bannerTimerId, setBannerTimerId] = useState(); const timer = 3000; // 임의로 넣어뒀습니다 @@ -83,17 +84,21 @@ export default function TopBanner({ banner }: props) { )} -
-
- { +
+
+ {banner[currentIndex].image !== undefined && ( + { + )}
{banner[currentIndex].head}
diff --git a/42manito/src/pages/Mentorings/index.tsx b/42manito/src/pages/Mentorings/index.tsx index a7686005..4d4d5cf2 100644 --- a/42manito/src/pages/Mentorings/index.tsx +++ b/42manito/src/pages/Mentorings/index.tsx @@ -21,22 +21,22 @@ const Mentoring = () => { link: "/Guide", backgroundColor: "bg-signature_color-500", textColor: "text-white", - image: "/guide.png", - license: - "https://kor.pngtree.com/freepng/meb-map-guide_4462396.html' 의 PNG 이미지 kor.pngtree.com", + // image: "/guide.png", + // license: + // "https://kor.pngtree.com/freepng/meb-map-guide_4462396.html' 의 PNG 이미지 kor.pngtree.com", }, ]; const router = useRouter(); const uid = useSelector((state: RootState) => state.rootReducers.global.uId); const [role, setRole] = useState(ReservationRole.ALL); const isReservationModalOpen = useSelector( - (state: RootState) => state.rootReducers.reservation.isReservationModalOpen + (state: RootState) => state.rootReducers.reservation.isReservationModalOpen, ); const isFeedbackModalOpen = useSelector( - (state: RootState) => state.rootReducers.reservation.isFeedbackModalOpen + (state: RootState) => state.rootReducers.reservation.isFeedbackModalOpen, ); const isCancelModalOpen = useSelector( - (state: RootState) => state.rootReducers.reservation.isCancelModalOpen + (state: RootState) => state.rootReducers.reservation.isCancelModalOpen, ); const handleRoleSelect = (id: string) => { if (id === "mentor") { diff --git a/42manito/src/styles/banner.css b/42manito/src/styles/banner.css index a6a90072..14cb69ac 100644 --- a/42manito/src/styles/banner.css +++ b/42manito/src/styles/banner.css @@ -7,11 +7,11 @@ .top-banner-container { @apply flex flex-col md:flex-row-reverse justify-between - w-[90%] lg:w-[900px]; + w-[90%] lg:w-[900px] hover:cursor-pointer; } .top-banner-left { - @apply ml-10 mb-10 flex flex-col justify-end + @apply ml-5 sm:ml-10 mb-10 flex flex-col justify-end cursor-pointer; } .top-banner-right { From 4e977741499b5daa988f9c6f16840740c792d48c Mon Sep 17 00:00:00 2001 From: Photogrammer Date: Fri, 6 Oct 2023 12:05:46 +0900 Subject: [PATCH 2/8] =?UTF-8?q?[fix]:=20=EC=83=81=EB=8B=A8=20=EB=A9=98?= =?UTF-8?q?=ED=86=A0=EB=A7=81=20=ED=83=AD=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20?= =?UTF-8?q?=EC=83=81=ED=83=9C=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Layout/Header/components/DesktopNav.tsx | 14 ++++++++------ .../Layout/Header/components/Sidebar.tsx | 8 +++++--- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/42manito/src/components/Layout/Header/components/DesktopNav.tsx b/42manito/src/components/Layout/Header/components/DesktopNav.tsx index 9ece6cde..e6282b52 100644 --- a/42manito/src/components/Layout/Header/components/DesktopNav.tsx +++ b/42manito/src/components/Layout/Header/components/DesktopNav.tsx @@ -13,12 +13,14 @@ export const DesktopNav = ({ Owner }: Props) => { 42 Manito - - 멘토링 - + {Owner !== 0 && ( + + 멘토링 + + )} {Owner !== 0 && (

- -

멘토링

- + {!!uid && ( + +

멘토링

+ + )} {!!uid && (

프로필

From 7277951bf6e1c5a2033aa29e5ed4526250c41029 Mon Sep 17 00:00:00 2001 From: Photogrammer Date: Fri, 6 Oct 2023 12:06:02 +0900 Subject: [PATCH 3/8] [fix]: reservation -> Reservation --- .../src/pages/{reservation => Reservation}/[reservationId].tsx | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename 42manito/src/pages/{reservation => Reservation}/[reservationId].tsx (100%) diff --git a/42manito/src/pages/reservation/[reservationId].tsx b/42manito/src/pages/Reservation/[reservationId].tsx similarity index 100% rename from 42manito/src/pages/reservation/[reservationId].tsx rename to 42manito/src/pages/Reservation/[reservationId].tsx From 6d9df285faee3661bf037a31d311555b470d213f Mon Sep 17 00:00:00 2001 From: Photogrammer Date: Fri, 6 Oct 2023 12:06:57 +0900 Subject: [PATCH 4/8] =?UTF-8?q?[fix]:=20footer=2042=20manito=20=EA=B0=84?= =?UTF-8?q?=EA=B2=A9=20=EB=AA=A8=EB=B0=94=EC=9D=BC=20=EC=A4=91=EC=95=99?= =?UTF-8?q?=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 42manito/src/components/Layout/Footer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/42manito/src/components/Layout/Footer.tsx b/42manito/src/components/Layout/Footer.tsx index e561f76d..86ef1438 100644 --- a/42manito/src/components/Layout/Footer.tsx +++ b/42manito/src/components/Layout/Footer.tsx @@ -12,7 +12,7 @@ export default function Footer() { href="/" className="flex title-font font-medium items-center md:justify-start justify-center text-bg_color-900" > - 42Manito + 42Manito 42Manito ©2023 From e00b7b2107477bcbb0b1198287fae92f3d9e75cf Mon Sep 17 00:00:00 2001 From: Photogrammer Date: Fri, 6 Oct 2023 12:23:20 +0900 Subject: [PATCH 5/8] =?UTF-8?q?[fix]:=20Mentorings=20=EB=B0=B0=EB=84=88=20?= =?UTF-8?q?=EB=A7=81=ED=81=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 42manito/src/pages/Mentorings/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/42manito/src/pages/Mentorings/index.tsx b/42manito/src/pages/Mentorings/index.tsx index 4d4d5cf2..b950db1c 100644 --- a/42manito/src/pages/Mentorings/index.tsx +++ b/42manito/src/pages/Mentorings/index.tsx @@ -18,7 +18,7 @@ const Mentoring = () => { head: "멘토링", title: "나의 멘토링", description: "멘토링 관리 페이지입니다", - link: "/Guide", + link: "/Mentorings", backgroundColor: "bg-signature_color-500", textColor: "text-white", // image: "/guide.png", From ab66441b97e5781e5c96e0d3b8c9d8c1453b7866 Mon Sep 17 00:00:00 2001 From: Photogrammer Date: Fri, 6 Oct 2023 12:23:41 +0900 Subject: [PATCH 6/8] =?UTF-8?q?[fix]:=20=EC=99=B8=EB=B6=80=20=EC=82=AC?= =?UTF-8?q?=EC=9D=B4=ED=8A=B8=20=EA=B2=BD=EB=A1=9C=EC=9D=BC=20=EA=B2=BD?= =?UTF-8?q?=EC=9A=B0=EC=97=90=EB=A7=8C=20=EC=83=88=ED=83=AD=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EC=97=B4=EB=8F=84=EB=A1=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 42manito/src/components/Banners/TopBanner.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/42manito/src/components/Banners/TopBanner.tsx b/42manito/src/components/Banners/TopBanner.tsx index 22e9d961..7711c4ce 100644 --- a/42manito/src/components/Banners/TopBanner.tsx +++ b/42manito/src/components/Banners/TopBanner.tsx @@ -14,8 +14,11 @@ export default function TopBanner({ banner }: props) { const router = useRouter(); const [currentIndex, setCurrentIndex] = useState(0); const handleBannerClick = () => { - // 새 탭으로 열기 - window.open(banner[currentIndex].link, "_blank"); + if (banner[currentIndex].link && banner[currentIndex].link[0] === "/") { + router.push(banner[currentIndex].link); + } else { + window.open(banner[currentIndex].link, "_blank"); + } }; const [bannerTimerId, setBannerTimerId] = useState(); const timer = 3000; // 임의로 넣어뒀습니다 From a226c770b4a504ebc105615a260e56ffafbba151 Mon Sep 17 00:00:00 2001 From: Photogrammer Date: Fri, 6 Oct 2023 17:46:35 +0900 Subject: [PATCH 7/8] =?UTF-8?q?[fix]:=20profile=20Update=20hashtag.length?= =?UTF-8?q?=20>=201=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 42manito/src/components/Profile/Update/HashtagUpdateInput.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/42manito/src/components/Profile/Update/HashtagUpdateInput.tsx b/42manito/src/components/Profile/Update/HashtagUpdateInput.tsx index 4623c2f6..b58a4c5b 100644 --- a/42manito/src/components/Profile/Update/HashtagUpdateInput.tsx +++ b/42manito/src/components/Profile/Update/HashtagUpdateInput.tsx @@ -26,7 +26,8 @@ export default function HashtagUpdateInput({ hashtags }: props) { ] = usePostHashtagMutation(); const hashtagPostHandler = () => { - if (inputValue.length === 0) { + if (inputValue.length <= 1) { + alert("최소 2글자 이상 입력해야합니다."); return; } const doesHashtagExist = hashtags.some( From c3e0c71d9dc9449d3753473774743dc63903d803 Mon Sep 17 00:00:00 2001 From: Photogrammer Date: Fri, 6 Oct 2023 17:47:32 +0900 Subject: [PATCH 8/8] =?UTF-8?q?[fix]:=20409=20alert=20=ED=95=B8=EB=93=A4?= =?UTF-8?q?=EB=A7=81=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 42manito/src/utils/BaseQuery.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/42manito/src/utils/BaseQuery.ts b/42manito/src/utils/BaseQuery.ts index 4d4c29df..4159227a 100644 --- a/42manito/src/utils/BaseQuery.ts +++ b/42manito/src/utils/BaseQuery.ts @@ -44,7 +44,8 @@ export const BaseQuery = } else if (status === 404) { alert("존재하지 않는 작업입니다."); } else if (status === 409) { - alert("이미 완료된 작업입니다."); + // 409 의 경우 따로 처리해야함. + // alert("이미 완료된 작업입니다."); } else if (status === 401 || status === 403) { alert("권한이 없습니다."); Router.push("/");