From c04f96801c384012ce9ab73651700540eb26a477 Mon Sep 17 00:00:00 2001 From: enunsnv Date: Tue, 26 May 2026 16:33:22 +0900 Subject: [PATCH 1/5] =?UTF-8?q?fix(web):=20=EB=8C=80=ED=95=99=20=EC=83=81?= =?UTF-8?q?=EC=84=B8=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EA=B3=B5=EC=9C=A0=20?= =?UTF-8?q?=EB=B2=84=ED=8A=BC=20svg=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/public/svgs/index.ts | 4 +++ apps/web/public/svgs/shareIcon.svg | 4 +++ apps/web/public/svgs/shareIconFilled.svg | 18 +++++++++++ .../UniversityDetail/_ui/UniversityBtns.tsx | 30 ++++++++++--------- 4 files changed, 42 insertions(+), 14 deletions(-) create mode 100644 apps/web/public/svgs/shareIcon.svg create mode 100644 apps/web/public/svgs/shareIconFilled.svg diff --git a/apps/web/public/svgs/index.ts b/apps/web/public/svgs/index.ts index 68ac0f50..6dad0563 100644 --- a/apps/web/public/svgs/index.ts +++ b/apps/web/public/svgs/index.ts @@ -15,6 +15,8 @@ import IconPostLikeOutline from "./post-like-outline.svg"; import IconScoreBanner from "./score-banner.svg"; import IconSearchBanner from "./search-banner.svg"; import IconSearchFilled from "./search-filled.svg"; +import IconShare from "./shareIcon.svg"; +import IconShareFilled from "./shareIconFilled.svg"; import IconSignupRegionAmerica from "./signup-region-america.svg"; import IconSignupRegionAsia from "./signup-region-asia.svg"; import IconSignupRegionEurope from "./signup-region-europe.svg"; @@ -42,6 +44,8 @@ export { IconScoreBanner, IconSearchBanner, IconSearchFilled, + IconShare, + IconShareFilled, IconSignupRegionAmerica, IconSignupRegionAsia, IconSignupRegionEurope, diff --git a/apps/web/public/svgs/shareIcon.svg b/apps/web/public/svgs/shareIcon.svg new file mode 100644 index 00000000..95219b16 --- /dev/null +++ b/apps/web/public/svgs/shareIcon.svg @@ -0,0 +1,4 @@ + + + + diff --git a/apps/web/public/svgs/shareIconFilled.svg b/apps/web/public/svgs/shareIconFilled.svg new file mode 100644 index 00000000..6f01d5b0 --- /dev/null +++ b/apps/web/public/svgs/shareIconFilled.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/apps/web/src/app/university/[homeUniversity]/[id]/_ui/UniversityDetail/_ui/UniversityBtns.tsx b/apps/web/src/app/university/[homeUniversity]/[id]/_ui/UniversityDetail/_ui/UniversityBtns.tsx index 2c2bcdaa..ce7c9ff1 100644 --- a/apps/web/src/app/university/[homeUniversity]/[id]/_ui/UniversityDetail/_ui/UniversityBtns.tsx +++ b/apps/web/src/app/university/[homeUniversity]/[id]/_ui/UniversityDetail/_ui/UniversityBtns.tsx @@ -4,6 +4,7 @@ import { useEffect, useState } from "react"; import { toast } from "react-hot-toast"; import { useDeleteWish, useGetWishList, usePostAddWish } from "@/apis/universities"; import useAuthStore from "@/lib/zustand/useAuthStore"; +import { IconShare, IconShareFilled } from "@/public/svgs"; const likeIcon = ( @@ -24,18 +25,6 @@ const likeIconFilled = ( ); -const copyIcon = ( - - - -); - interface UniversityBtnsProps { universityId: number; } @@ -43,6 +32,7 @@ const UniversityBtns = ({ universityId }: UniversityBtnsProps) => { const isAuthenticated = useAuthStore((state) => state.isAuthenticated); const [isLiked, setIsLiked] = useState(false); + const [isShareActive, setIsShareActive] = useState(false); const { data: favoriteUniv } = useGetWishList(isAuthenticated); const { mutate: postUniversityFavorite } = usePostAddWish(); const { mutate: deleteUniversityFavorite } = useDeleteWish(); @@ -64,6 +54,8 @@ const UniversityBtns = ({ universityId }: UniversityBtnsProps) => { const handleCopy = () => { navigator.clipboard.writeText(window.location.href).then(() => {}); toast.success("URL이 복사되었습니다."); + setIsShareActive(true); + setTimeout(() => setIsShareActive(false), 600); }; return ( <> @@ -86,10 +78,20 @@ const UniversityBtns = ({ universityId }: UniversityBtnsProps) => { {isLiked ? likeIconFilled : likeIcon} ); From fec0a83bb17f6387a054b8378c6fb35acb217119 Mon Sep 17 00:00:00 2001 From: enunsnv Date: Tue, 26 May 2026 16:49:48 +0900 Subject: [PATCH 2/5] =?UTF-8?q?feat(web):=20=EB=A9=98=ED=86=A0=20=EC=B9=B4?= =?UTF-8?q?=EB=93=9C=20=EC=95=84=ED=8B=B0=ED=81=B4=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/src/apis/news/getNewsList.ts | 4 +-- .../mentor/MentorCard/_ui/ArticlePreview.tsx | 26 +++++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 apps/web/src/components/mentor/MentorCard/_ui/ArticlePreview.tsx diff --git a/apps/web/src/apis/news/getNewsList.ts b/apps/web/src/apis/news/getNewsList.ts index fcbc7832..df349759 100644 --- a/apps/web/src/apis/news/getNewsList.ts +++ b/apps/web/src/apis/news/getNewsList.ts @@ -7,7 +7,7 @@ import { type ArticleListResponse, NewsQueryKeys, newsApi } from "./api"; /** * @description 아티클 목록 조회 훅 */ -const useGetArticleList = (userId: number) => { +const useGetArticleList = (userId: number, options?: { enabled?: boolean }) => { return useQuery({ queryKey: [NewsQueryKeys.articleList, userId], queryFn: () => { @@ -17,7 +17,7 @@ const useGetArticleList = (userId: number) => { return newsApi.getArticleList(userId); }, staleTime: 1000 * 60 * 10, // 10분 - enabled: userId !== null && userId !== 0, + enabled: userId !== null && userId !== 0 && (options?.enabled ?? true), select: (data) => data.newsResponseList, }); }; diff --git a/apps/web/src/components/mentor/MentorCard/_ui/ArticlePreview.tsx b/apps/web/src/components/mentor/MentorCard/_ui/ArticlePreview.tsx new file mode 100644 index 00000000..df0e18bd --- /dev/null +++ b/apps/web/src/components/mentor/MentorCard/_ui/ArticlePreview.tsx @@ -0,0 +1,26 @@ +import Image from "@/components/ui/FallbackImage"; +import type { Article } from "@/types/news"; +import { normalizeImageUrlToUploadCdn } from "@/utils/cdnUrl"; + +interface ArticlePreviewProps { + article: Article; +} + +const ArticlePreview = ({ article }: ArticlePreviewProps) => { + const thumbnailUrl = normalizeImageUrlToUploadCdn(article.thumbnailUrl); + return ( + +
+ {article.title} +
+

{article.title}

+
+ ); +}; + +export default ArticlePreview; From 73716d2a25345f32804ad9f956ba4c376f43ab17 Mon Sep 17 00:00:00 2001 From: enunsnv Date: Wed, 27 May 2026 16:23:44 +0900 Subject: [PATCH 3/5] =?UTF-8?q?style(web):=20=ED=86=A0=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=20=EB=94=94=EC=9E=90=EC=9D=B8=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/public/svgs/toast/cap.svg | 9 +++ apps/web/public/svgs/toast/index.ts | 7 ++ apps/web/public/svgs/toast/like.svg | 9 +++ apps/web/public/svgs/toast/link.svg | 9 +++ apps/web/public/svgs/toast/logo.svg | 9 +++ apps/web/public/svgs/toast/univ.svg | 9 +++ .../[boardCode]/[postId]/Content.tsx | 3 + apps/web/src/app/layout.tsx | 2 +- .../src/app/my/_ui/MyProfileContent/index.tsx | 5 +- .../UniversityDetail/_ui/UniversityBtns.tsx | 5 +- .../university/application/apply/GpaStep.tsx | 6 +- .../application/apply/LanguageStep.tsx | 6 +- .../src/app/university/score/ScoreScreen.tsx | 67 +++++++++++++------ .../components/mentor/MentorCard/index.tsx | 19 +++++- apps/web/src/lib/toast/showIconToast.tsx | 49 ++++++++++++++ 15 files changed, 181 insertions(+), 33 deletions(-) create mode 100644 apps/web/public/svgs/toast/cap.svg create mode 100644 apps/web/public/svgs/toast/index.ts create mode 100644 apps/web/public/svgs/toast/like.svg create mode 100644 apps/web/public/svgs/toast/link.svg create mode 100644 apps/web/public/svgs/toast/logo.svg create mode 100644 apps/web/public/svgs/toast/univ.svg create mode 100644 apps/web/src/lib/toast/showIconToast.tsx diff --git a/apps/web/public/svgs/toast/cap.svg b/apps/web/public/svgs/toast/cap.svg new file mode 100644 index 00000000..c0e82300 --- /dev/null +++ b/apps/web/public/svgs/toast/cap.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/apps/web/public/svgs/toast/index.ts b/apps/web/public/svgs/toast/index.ts new file mode 100644 index 00000000..c4cffe67 --- /dev/null +++ b/apps/web/public/svgs/toast/index.ts @@ -0,0 +1,7 @@ +import IconToastCap from "./cap.svg"; +import IconToastLike from "./like.svg"; +import IconToastLink from "./link.svg"; +import IconToastLogo from "./logo.svg"; +import IconToastUniv from "./univ.svg"; + +export { IconToastCap, IconToastLike, IconToastLink, IconToastLogo, IconToastUniv }; diff --git a/apps/web/public/svgs/toast/like.svg b/apps/web/public/svgs/toast/like.svg new file mode 100644 index 00000000..3b60f210 --- /dev/null +++ b/apps/web/public/svgs/toast/like.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/apps/web/public/svgs/toast/link.svg b/apps/web/public/svgs/toast/link.svg new file mode 100644 index 00000000..33940627 --- /dev/null +++ b/apps/web/public/svgs/toast/link.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/apps/web/public/svgs/toast/logo.svg b/apps/web/public/svgs/toast/logo.svg new file mode 100644 index 00000000..2896762a --- /dev/null +++ b/apps/web/public/svgs/toast/logo.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/apps/web/public/svgs/toast/univ.svg b/apps/web/public/svgs/toast/univ.svg new file mode 100644 index 00000000..b6da0fda --- /dev/null +++ b/apps/web/public/svgs/toast/univ.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/apps/web/src/app/community/[boardCode]/[postId]/Content.tsx b/apps/web/src/app/community/[boardCode]/[postId]/Content.tsx index a6952419..cc584145 100644 --- a/apps/web/src/app/community/[boardCode]/[postId]/Content.tsx +++ b/apps/web/src/app/community/[boardCode]/[postId]/Content.tsx @@ -5,6 +5,7 @@ import Image from "@/components/ui/FallbackImage"; import LinkifyText from "@/components/ui/LinkifyText"; import { COMMUNITY_MAX_UPLOAD_IMAGES } from "@/constants/community"; import { DEFAULT_PROFILE_IMAGE } from "@/constants/profile"; +import { showIconToast } from "@/lib/toast/showIconToast"; import { IconCloseFilled, IconPostLikeFilled, IconPostLikeOutline } from "@/public/svgs"; import { IconCommunication } from "@/public/svgs/community"; import type { PostImage as PostImageType, Post as PostType } from "@/types/community"; @@ -52,6 +53,7 @@ const Content = ({ post, postId }: ContentProps) => { onSuccess: (data) => { setLikeCount(data.likeCount); setIsLiked(data.isLiked); + showIconToast("like", "좋아요가 해제되었어요"); }, onError: () => { // 롤백 @@ -66,6 +68,7 @@ const Content = ({ post, postId }: ContentProps) => { onSuccess: (data) => { setLikeCount(data.likeCount); setIsLiked(data.isLiked); + showIconToast("like", "좋아요가 성공적으로 눌러졌어요!"); }, onError: () => { // 롤백 diff --git a/apps/web/src/app/layout.tsx b/apps/web/src/app/layout.tsx index cd9351da..81763899 100644 --- a/apps/web/src/app/layout.tsx +++ b/apps/web/src/app/layout.tsx @@ -79,7 +79,7 @@ const RootLayout = ({ children }: { children: ReactNode }) => ( { 좋아요한 글 */} - ))} {curTab === "학점" && gpaScoreList.map((score) => ( - + type="button" + className="text-left" + onClick={() => handleScoreClick(score.verifyStatus)} + > + + ))} )} diff --git a/apps/web/src/components/mentor/MentorCard/index.tsx b/apps/web/src/components/mentor/MentorCard/index.tsx index 7edf77ea..d898ce18 100644 --- a/apps/web/src/components/mentor/MentorCard/index.tsx +++ b/apps/web/src/components/mentor/MentorCard/index.tsx @@ -2,12 +2,14 @@ import clsx from "clsx"; import Link from "next/link"; -import { useState } from "react"; +import { useMemo, useState } from "react"; +import { useGetArticleList } from "@/apis/news"; import { IconDirectionDown, IconDirectionUp } from "@/public/svgs/mentor"; import type { MentorCardDetail, MentorCardPreview } from "@/types/mentor"; import ChannelBadge from "../../ui/ChannelBadge"; import ProfileWithBadge from "../../ui/ProfileWithBadge"; import StudyDate from "../StudyDate"; +import ArticlePreview from "./_ui/ArticlePreview"; import usePostApplyMentorHandler from "./hooks/usePostApplyMentorHandler"; interface MentorCardProps { @@ -36,6 +38,13 @@ const MentorCard = ({ mentor, observeRef, isMine = false }: MentorCardProps) => const isDetail = mentor && "passTip" in mentor; + const { data: articles } = useGetArticleList(id ?? 0, { enabled: isExpanded && !!id }); + + const latestArticle = useMemo(() => { + if (!articles || articles.length === 0) return undefined; + return [...articles].sort((a, b) => b.updatedAt.localeCompare(a.updatedAt))[0]; + }, [articles]); + return (
+ {/* 멘토 아티클 */} + {latestArticle && ( +
+

멘토 아티클

+ +
+ )} + {/* 액션 버튼 */}
{isMine ? ( diff --git a/apps/web/src/lib/toast/showIconToast.tsx b/apps/web/src/lib/toast/showIconToast.tsx new file mode 100644 index 00000000..db4d7595 --- /dev/null +++ b/apps/web/src/lib/toast/showIconToast.tsx @@ -0,0 +1,49 @@ +import type { FC, SVGProps } from "react"; +import { toast } from "react-hot-toast"; + +import { IconToastCap, IconToastLike, IconToastLink, IconToastLogo, IconToastUniv } from "@/public/svgs/toast"; + +export type ToastIconKey = "like" | "link" | "univ" | "cap" | "logo"; + +const ICONS: Record>> = { + like: IconToastLike, + link: IconToastLink, + univ: IconToastUniv, + cap: IconToastCap, + logo: IconToastLogo, +}; + +const TOAST_DURATION = 3000; +const TOAST_COOLDOWN = 3500; +const activeToastKeys = new Set(); + +export const showIconToast = (icon: ToastIconKey, message: string) => { + const Icon = ICONS[icon]; + const key = `${icon}:${message}`; + + if (activeToastKeys.has(key)) return; + activeToastKeys.add(key); + + toast.custom( + () => ( +
+ + + {message} + +
+ ), + { duration: TOAST_DURATION }, + ); + + setTimeout(() => activeToastKeys.delete(key), TOAST_COOLDOWN); +}; From 072042c070082bba09a2f45895740de14426ac92 Mon Sep 17 00:00:00 2001 From: enunsnv Date: Wed, 27 May 2026 16:48:09 +0900 Subject: [PATCH 4/5] =?UTF-8?q?style(web):=20=ED=86=A0=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=20=EB=94=94=EC=9E=90=EC=9D=B8=20=EC=A0=84=EC=97=AD=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/src/apis/Auth/postAppleAuth.ts | 4 ++-- apps/web/src/apis/Auth/postEmailLogin.ts | 4 ++-- apps/web/src/apis/Auth/postKakaoAuth.ts | 4 ++-- apps/web/src/apis/MyPage/patchPassword.ts | 4 ++-- apps/web/src/apis/MyPage/patchProfile.ts | 4 ++-- apps/web/src/apis/Scores/postCreateGpa.ts | 4 ++-- .../src/apis/Scores/postCreateLanguageTest.ts | 4 ++-- apps/web/src/apis/community/deleteComment.ts | 4 ++-- apps/web/src/apis/community/deletePost.ts | 4 ++-- .../web/src/apis/community/patchUpdatePost.ts | 4 ++-- .../src/apis/community/postCreateComment.ts | 4 ++-- apps/web/src/apis/community/postCreatePost.ts | 4 ++-- apps/web/src/apis/reports/postReport.ts | 4 ++-- .../(home)/_ui/FindLastYearScoreBar/index.tsx | 4 ++-- .../[boardCode]/[postId]/KebabMenu.tsx | 6 ++--- .../[postId]/modify/PostModifyForm.tsx | 8 +++---- .../community/[boardCode]/create/PostForm.tsx | 8 +++---- .../_hooks/useCommunityImageUpload.ts | 8 +++---- .../chat/[chatId]/_ui/ChatContent/index.tsx | 6 ++--- .../src/app/my/_ui/MyProfileContent/index.tsx | 4 +--- .../_components/UniversityScreen/index.tsx | 6 ++--- apps/web/src/app/my/apply-mentor/page.tsx | 4 ++-- .../_hooks/useSelectUniversities.ts | 4 ++-- .../src/app/sign-up/email/EmailSignUpForm.tsx | 10 ++++---- .../UniversityDetail/_ui/UniversityBtns.tsx | 3 +-- .../application/apply/ApplyPageContent.tsx | 8 +++---- .../src/app/university/score/ScoreCard.tsx | 4 ++-- .../GlobalLayout/ui/AIInspectorFab/index.tsx | 18 +++++++------- .../login/signup/SignupPrepareScreen.tsx | 4 ++-- .../login/signup/SignupProfileScreen.tsx | 4 ++-- .../login/signup/SignupRegionScreen.tsx | 4 ++-- .../components/login/signup/SignupSurvey.tsx | 6 ++--- apps/web/src/components/modal/SurveyModal.tsx | 6 ++--- apps/web/src/lib/react-query/queryClient.ts | 13 +++------- apps/web/src/lib/toast/options.ts | 24 ------------------- apps/web/src/utils/authUtils.ts | 8 +++---- apps/web/src/utils/axiosInstance.ts | 4 ++-- 37 files changed, 96 insertions(+), 130 deletions(-) delete mode 100644 apps/web/src/lib/toast/options.ts diff --git a/apps/web/src/apis/Auth/postAppleAuth.ts b/apps/web/src/apis/Auth/postAppleAuth.ts index b43041ad..dc024c39 100644 --- a/apps/web/src/apis/Auth/postAppleAuth.ts +++ b/apps/web/src/apis/Auth/postAppleAuth.ts @@ -2,7 +2,7 @@ import { useMutation } from "@tanstack/react-query"; import type { AxiosError } from "axios"; import { useRouter } from "next/navigation"; -import { toast } from "react-hot-toast"; +import { showIconToast } from "@/lib/toast/showIconToast"; import useAuthStore from "@/lib/zustand/useAuthStore"; import { type AppleAuthRequest, type AppleAuthResponse, authApi } from "./api"; @@ -20,7 +20,7 @@ const usePostAppleAuth = () => { // refreshToken은 서버에서 HTTP-only 쿠키로 자동 설정됨 useAuthStore.getState().setAccessToken(data.accessToken); - toast.success("로그인에 성공했습니다."); + showIconToast("logo", "로그인에 성공했습니다."); setTimeout(() => { router.push("/"); diff --git a/apps/web/src/apis/Auth/postEmailLogin.ts b/apps/web/src/apis/Auth/postEmailLogin.ts index 760e18d7..8d1317bb 100644 --- a/apps/web/src/apis/Auth/postEmailLogin.ts +++ b/apps/web/src/apis/Auth/postEmailLogin.ts @@ -2,7 +2,7 @@ import { useMutation } from "@tanstack/react-query"; import type { AxiosError } from "axios"; import { useRouter } from "next/navigation"; -import { toast } from "react-hot-toast"; +import { showIconToast } from "@/lib/toast/showIconToast"; import useAuthStore from "@/lib/zustand/useAuthStore"; import { authApi, type EmailLoginRequest, type EmailLoginResponse } from "./api"; @@ -22,7 +22,7 @@ const usePostEmailAuth = () => { // refreshToken은 서버에서 HTTP-only 쿠키로 자동 설정됨 setAccessToken(accessToken); - toast.success("로그인에 성공했습니다."); + showIconToast("logo", "로그인에 성공했습니다."); // Zustand persist middleware가 localStorage에 저장할 시간을 보장 // 토큰 저장 후 리다이렉트하여 타이밍 이슈 방지 diff --git a/apps/web/src/apis/Auth/postKakaoAuth.ts b/apps/web/src/apis/Auth/postKakaoAuth.ts index a25793c7..f8671416 100644 --- a/apps/web/src/apis/Auth/postKakaoAuth.ts +++ b/apps/web/src/apis/Auth/postKakaoAuth.ts @@ -2,7 +2,7 @@ import { useMutation } from "@tanstack/react-query"; import type { AxiosError } from "axios"; import { useRouter } from "next/navigation"; -import { toast } from "react-hot-toast"; +import { showIconToast } from "@/lib/toast/showIconToast"; import useAuthStore from "@/lib/zustand/useAuthStore"; import { authApi, type KakaoAuthRequest, type KakaoAuthResponse } from "./api"; @@ -21,7 +21,7 @@ const usePostKakaoAuth = () => { // refreshToken은 서버에서 HTTP-only 쿠키로 자동 설정됨 setAccessToken(data.accessToken); - toast.success("로그인에 성공했습니다."); + showIconToast("logo", "로그인에 성공했습니다."); setTimeout(() => { router.push("/"); }, 100); diff --git a/apps/web/src/apis/MyPage/patchPassword.ts b/apps/web/src/apis/MyPage/patchPassword.ts index 542c8d51..33728baf 100644 --- a/apps/web/src/apis/MyPage/patchPassword.ts +++ b/apps/web/src/apis/MyPage/patchPassword.ts @@ -2,7 +2,7 @@ import { useMutation, useQueryClient } from "@tanstack/react-query"; import type { AxiosError } from "axios"; import { useRouter } from "next/navigation"; -import { toast } from "react-hot-toast"; +import { showIconToast } from "@/lib/toast/showIconToast"; import useAuthStore from "@/lib/zustand/useAuthStore"; import { QueryKeys } from "../queryKeys"; import { myPageApi, type PasswordPatchRequest } from "./api"; @@ -18,7 +18,7 @@ const usePatchMyPassword = () => { onSuccess: () => { clearAccessToken(); queryClient.clear(); - toast.success("비밀번호가 성공적으로 변경되었습니다."); + showIconToast("logo", "비밀번호가 성공적으로 변경되었습니다."); router.replace("/"); }, }); diff --git a/apps/web/src/apis/MyPage/patchProfile.ts b/apps/web/src/apis/MyPage/patchProfile.ts index 778732b2..573835b4 100644 --- a/apps/web/src/apis/MyPage/patchProfile.ts +++ b/apps/web/src/apis/MyPage/patchProfile.ts @@ -1,6 +1,6 @@ import { useMutation, useQueryClient } from "@tanstack/react-query"; import type { AxiosError } from "axios"; -import { toast } from "react-hot-toast"; +import { showIconToast } from "@/lib/toast/showIconToast"; import { QueryKeys } from "../queryKeys"; import { myPageApi, type ProfilePatchRequest } from "./api"; @@ -16,7 +16,7 @@ const usePatchMyInfo = () => { }); }, onSuccess: () => { - toast.success("프로필이 성공적으로 수정되었습니다."); + showIconToast("logo", "프로필이 성공적으로 수정되었습니다."); }, }); }; diff --git a/apps/web/src/apis/Scores/postCreateGpa.ts b/apps/web/src/apis/Scores/postCreateGpa.ts index e138cab9..8c33f3f7 100644 --- a/apps/web/src/apis/Scores/postCreateGpa.ts +++ b/apps/web/src/apis/Scores/postCreateGpa.ts @@ -1,6 +1,6 @@ import { useMutation, useQueryClient } from "@tanstack/react-query"; -import { toast } from "react-hot-toast"; +import { showIconToast } from "@/lib/toast/showIconToast"; import { ScoresQueryKeys, scoresApi, type UsePostGpaScoreRequest } from "./api"; /** @@ -13,7 +13,7 @@ export const usePostGpaScore = () => { mutationFn: (request: UsePostGpaScoreRequest) => scoresApi.postGpaScore(request), onSuccess: () => { - toast.success("학점 정보가 성공적으로 제출되었습니다."); + showIconToast("logo", "학점 정보가 성공적으로 제출되었습니다."); queryClient.invalidateQueries({ queryKey: [ScoresQueryKeys.myGpaScore] }); }, }); diff --git a/apps/web/src/apis/Scores/postCreateLanguageTest.ts b/apps/web/src/apis/Scores/postCreateLanguageTest.ts index 450a1e68..93f415e2 100644 --- a/apps/web/src/apis/Scores/postCreateLanguageTest.ts +++ b/apps/web/src/apis/Scores/postCreateLanguageTest.ts @@ -1,6 +1,6 @@ import { useMutation, useQueryClient } from "@tanstack/react-query"; -import { toast } from "react-hot-toast"; +import { showIconToast } from "@/lib/toast/showIconToast"; import { ScoresQueryKeys, scoresApi, type UsePostLanguageTestScoreRequest } from "./api"; /** @@ -13,7 +13,7 @@ export const usePostLanguageTestScore = () => { mutationFn: (request: UsePostLanguageTestScoreRequest) => scoresApi.postLanguageTestScore(request), onSuccess: () => { - toast.success("어학 성적이 성공적으로 제출되었습니다."); + showIconToast("logo", "어학 성적이 성공적으로 제출되었습니다."); queryClient.invalidateQueries({ queryKey: [ScoresQueryKeys.myLanguageTestScore] }); }, }); diff --git a/apps/web/src/apis/community/deleteComment.ts b/apps/web/src/apis/community/deleteComment.ts index 596f7f25..5f22aee0 100644 --- a/apps/web/src/apis/community/deleteComment.ts +++ b/apps/web/src/apis/community/deleteComment.ts @@ -1,7 +1,7 @@ import { useMutation, useQueryClient } from "@tanstack/react-query"; import type { AxiosError } from "axios"; -import { toast } from "react-hot-toast"; +import { showIconToast } from "@/lib/toast/showIconToast"; import { type CommentIdResponse, CommunityQueryKeys, communityApi } from "./api"; interface DeleteCommentRequest { @@ -20,7 +20,7 @@ const useDeleteComment = () => { onSuccess: (_data, variables) => { // 해당 게시글 상세 쿼리를 무효화하여 댓글 목록 갱신 queryClient.invalidateQueries({ queryKey: [CommunityQueryKeys.posts, variables.postId] }); - toast.success("댓글이 삭제되었습니다."); + showIconToast("logo", "댓글이 삭제되었습니다."); }, }); }; diff --git a/apps/web/src/apis/community/deletePost.ts b/apps/web/src/apis/community/deletePost.ts index e843d3a0..e7f42384 100644 --- a/apps/web/src/apis/community/deletePost.ts +++ b/apps/web/src/apis/community/deletePost.ts @@ -2,7 +2,7 @@ import { useMutation, useQueryClient } from "@tanstack/react-query"; import type { AxiosError, AxiosResponse } from "axios"; import { useRouter } from "next/navigation"; -import { toast } from "react-hot-toast"; +import { showIconToast } from "@/lib/toast/showIconToast"; import useAuthStore from "@/lib/zustand/useAuthStore"; import { CommunityQueryKeys, communityApi, type DeletePostResponse } from "./api"; @@ -53,7 +53,7 @@ const useDeletePost = () => { await revalidateCommunityPage(variables.boardCode, accessToken); } - toast.success("게시글이 성공적으로 삭제되었습니다."); + showIconToast("logo", "게시글이 성공적으로 삭제되었습니다."); // 게시글 목록 페이지 이동 router.replace(`/community/${variables.boardCode || "FREE"}`); diff --git a/apps/web/src/apis/community/patchUpdatePost.ts b/apps/web/src/apis/community/patchUpdatePost.ts index 784260ca..a45e948d 100644 --- a/apps/web/src/apis/community/patchUpdatePost.ts +++ b/apps/web/src/apis/community/patchUpdatePost.ts @@ -1,6 +1,6 @@ import { useMutation, useQueryClient } from "@tanstack/react-query"; import type { AxiosError } from "axios"; -import { toast } from "react-hot-toast"; +import { showIconToast } from "@/lib/toast/showIconToast"; import useAuthStore from "@/lib/zustand/useAuthStore"; import { CommunityQueryKeys, communityApi, type PostIdResponse, type PostUpdateRequest } from "./api"; @@ -51,7 +51,7 @@ const useUpdatePost = () => { await revalidateCommunityPage(variables.boardCode, accessToken); } - toast.success("게시글이 수정되었습니다."); + showIconToast("logo", "게시글이 수정되었습니다."); }, }); }; diff --git a/apps/web/src/apis/community/postCreateComment.ts b/apps/web/src/apis/community/postCreateComment.ts index d80730b9..5fea1a65 100644 --- a/apps/web/src/apis/community/postCreateComment.ts +++ b/apps/web/src/apis/community/postCreateComment.ts @@ -1,7 +1,7 @@ import { useMutation, useQueryClient } from "@tanstack/react-query"; import type { AxiosError } from "axios"; -import { toast } from "react-hot-toast"; +import { showIconToast } from "@/lib/toast/showIconToast"; import { type CommentCreateRequest, type CommentIdResponse, CommunityQueryKeys, communityApi } from "./api"; /** @@ -15,7 +15,7 @@ const useCreateComment = () => { onSuccess: (_data, variables) => { // 해당 게시글 상세 쿼리를 무효화하여 댓글 목록 갱신 queryClient.invalidateQueries({ queryKey: [CommunityQueryKeys.posts, variables.postId] }); - toast.success("댓글이 등록되었습니다."); + showIconToast("logo", "댓글이 등록되었습니다."); }, }); }; diff --git a/apps/web/src/apis/community/postCreatePost.ts b/apps/web/src/apis/community/postCreatePost.ts index 5339936a..aec6291c 100644 --- a/apps/web/src/apis/community/postCreatePost.ts +++ b/apps/web/src/apis/community/postCreatePost.ts @@ -1,6 +1,6 @@ import { useMutation, useQueryClient } from "@tanstack/react-query"; import type { AxiosError } from "axios"; -import { toast } from "react-hot-toast"; +import { showIconToast } from "@/lib/toast/showIconToast"; import useAuthStore from "@/lib/zustand/useAuthStore"; import { CommunityQueryKeys, communityApi, type PostCreateRequest, type PostIdResponse } from "./api"; @@ -44,7 +44,7 @@ const useCreatePost = () => { await revalidateCommunityPage(data.boardCode, accessToken); } - toast.success("게시글이 등록되었습니다."); + showIconToast("logo", "게시글이 등록되었습니다."); }, }); }; diff --git a/apps/web/src/apis/reports/postReport.ts b/apps/web/src/apis/reports/postReport.ts index 665c61ef..c47d3aa5 100644 --- a/apps/web/src/apis/reports/postReport.ts +++ b/apps/web/src/apis/reports/postReport.ts @@ -2,7 +2,7 @@ import { useMutation } from "@tanstack/react-query"; import type { AxiosError } from "axios"; -import { toast } from "react-hot-toast"; +import { showIconToast } from "@/lib/toast/showIconToast"; import { reportsApi, type UsePostReportsRequest } from "./api"; /** @@ -12,7 +12,7 @@ const usePostReports = () => { return useMutation, UsePostReportsRequest>({ mutationFn: reportsApi.postReport, onSuccess: () => { - toast.success("신고가 성공적으로 등록되었습니다."); + showIconToast("logo", "신고가 성공적으로 등록되었습니다."); }, }); }; diff --git a/apps/web/src/app/(home)/_ui/FindLastYearScoreBar/index.tsx b/apps/web/src/app/(home)/_ui/FindLastYearScoreBar/index.tsx index 3bf5b0a5..0ac498d8 100644 --- a/apps/web/src/app/(home)/_ui/FindLastYearScoreBar/index.tsx +++ b/apps/web/src/app/(home)/_ui/FindLastYearScoreBar/index.tsx @@ -1,13 +1,13 @@ "use client"; -import { toast } from "react-hot-toast"; +import { showIconToast } from "@/lib/toast/showIconToast"; import { IconGraduationCap, IconRightArrow } from "@/public/svgs/home"; const FindLastYearScoreBar = () => { return (