diff --git a/public/icons/sijak_footer_logo.svg b/public/icons/sijak_footer_logo.svg new file mode 100644 index 0000000..951a781 --- /dev/null +++ b/public/icons/sijak_footer_logo.svg @@ -0,0 +1,4 @@ + + + + diff --git a/public/images/sijak_footer_logo.png b/public/images/sijak_footer_logo.png deleted file mode 100755 index 6046abf..0000000 Binary files a/public/images/sijak_footer_logo.png and /dev/null differ diff --git a/src/app/class/[id]/page.tsx b/src/app/class/[id]/page.tsx index a80666c..1e0a366 100755 --- a/src/app/class/[id]/page.tsx +++ b/src/app/class/[id]/page.tsx @@ -217,17 +217,6 @@ const LectureInfoPage = () => { /> - {/* {isLoading && ( -
-
- -
- - -
-
-
- )} */} {renderSummary()} {lectureInfo && ( diff --git a/src/app/like/page.tsx b/src/app/like/page.tsx index 8f71df9..312d2f8 100755 --- a/src/app/like/page.tsx +++ b/src/app/like/page.tsx @@ -20,10 +20,10 @@ import { import { useEffect, useState } from "react"; import Paginator from "@/shared/ui/Pagination/Paginator"; -import { toast } from "sonner"; import useDeleteDeactivatesLikeLecture from "@/features/like/api/useDeleteDeactivatesLikeLecture"; import { useInView } from "react-intersection-observer"; import useLikeLectureList from "@/features/like/api/useLikeLectureList"; +import { useToast } from "@/shared/hooks/useToast"; const LikePage = () => { const [lectureListData, setLectureListData] = useState< @@ -41,17 +41,19 @@ const LikePage = () => { const [openDeleteLectureDialog, setOpenDeleteLectureDialog] = useState(false); + const { toast } = useToast(); + const { control, watch } = useForm({ defaultValues: { onlyCanApply: likeLectureParams.mode, }, }); - const { ref, inView } = useInView({ - threshold: 1.0, // 100% 보일 때 트리거 - }); + // const { ref, inView } = useInView({ + // threshold: 1.0, // 100% 보일 때 트리거 + // }); - const { data, isLoading, isSuccess, refetch } = useLikeLectureList({ + const { data, isLoading, isSuccess } = useLikeLectureList({ page: likeLectureParams.page, size: likeLectureParams.size, mode: likeLectureParams.mode, @@ -65,12 +67,12 @@ const LikePage = () => { if (data?.data.data.some((lecture) => lecture.status === false)) { deleteDeactivatesLecture.mutate(undefined, { onSuccess: () => { - toast("마감된 찜 클래스를 삭제했어요"); + toast({ title: "마감된 찜 클래스가 삭제됐어요." }); setOpenDeleteLectureDialog(false); }, }); } else { - toast("마감된 찜 클래스가 없어요"); + toast({ title: "마감된 찜 클래스가 없어요." }); setOpenDeleteLectureDialog(false); } }; @@ -93,6 +95,7 @@ const LikePage = () => { // setHasNext(data.data.hasNext); // } // }, [data, isSuccess]); + useEffect(() => { if (isSuccess) { setLectureListData(data.data.data); @@ -108,16 +111,16 @@ const LikePage = () => { })); }, [onlyCanApply]); - useEffect(() => { - if (inView && hasNext && !isLoading) { - setLikeLectureParams((prev) => { - return { - ...prev, - page: prev.page + 1, - }; - }); - } - }, [inView, hasNext, isLoading]); + // useEffect(() => { + // if (inView && hasNext && !isLoading) { + // setLikeLectureParams((prev) => { + // return { + // ...prev, + // page: prev.page + 1, + // }; + // }); + // } + // }, [inView, hasNext, isLoading]); const triggerItem = () => { return ( @@ -197,7 +200,8 @@ const LikePage = () => { return ( ); @@ -218,56 +222,54 @@ const LikePage = () => { -
-
- {!isLoading && lectureListData && lectureListData.length > 0 && ( -
-
- ( - // FIXME: 로직 확인 필요 - 멘토님 도움 필요 - { - onChange(checked); - setLikeLectureParams((prev) => ({ - ...prev, - mode: !!checked, - page: 0, - })); - }} - onBlur={onBlur} - ref={ref} - /> - )} - /> - -
- +
+
+
+ ( + // FIXME: 로직 확인 필요 - 멘토님 도움 필요 + { + onChange(checked); + setLikeLectureParams((prev) => ({ + ...prev, + mode: !!checked, + page: 0, + })); + }} + onBlur={onBlur} + ref={ref} + /> + )} /> +
- )} + +
{renderLikeCardContent()}
diff --git a/src/app/login/callback/page.tsx b/src/app/login/callback/page.tsx index c4a99e8..918e22f 100755 --- a/src/app/login/callback/page.tsx +++ b/src/app/login/callback/page.tsx @@ -5,16 +5,18 @@ import { useRouter, useSearchParams } from "next/navigation"; import { SquareLoader } from "react-spinners"; import { setCookie } from "cookies-next"; -import { toast } from "sonner"; import useGetAccessToken from "@/features/authentication/api/useGetAccessToken"; import useGetLoginUserInfo from "@/entities/user/api/useGetLoginUserInfo"; import useLoginedUserStore from "@/shared/store/user"; +import { useToast } from "@/shared/hooks/useToast"; const LoginCallback = () => { const router = useRouter(); const searchParams = useSearchParams(); const code = searchParams.get("code"); + const { toast } = useToast(); + // Access Token을 가져오는 훅 const { data: tokenData, @@ -56,9 +58,16 @@ const LoginCallback = () => { // 로그인 사용자 정보 요청 if (isLoginUserSuccess) { setLoginedUser(loginUserData.data.data); - toast("회원가입 / 로그인 성공", { - description: "시ː니어를 위한 문화생활 플랫폼에 오신 걸 환영합니다!", - }); + if (tokenData.is_new === true) { + toast({ + title: "회원가입이 완료되었습니다.", + }); + } + if (tokenData.is_new === false) { + toast({ + title: "로그인 성공!", + }); + } if (tokenData.is_new) { router.push("/signup"); @@ -71,8 +80,8 @@ const LoginCallback = () => { } if (tokenError) { - toast("로그인 실패", { - description: `${tokenError}`, + toast({ + title: "로그인 실패!", }); } }, [ diff --git a/src/app/page.tsx b/src/app/page.tsx index 379addb..b6e2e7f 100755 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -277,7 +277,11 @@ const Home = () => { ); } - return ; + return ( +
+ +
+ ); }; return ( @@ -339,7 +343,9 @@ const Home = () => {
-
{renderHomeLectureList()}
+
+ {renderHomeLectureList()} +
@@ -349,8 +355,8 @@ const Home = () => { )}
-
-
+
+
시ː작 PICK 클래스 📌
@@ -358,7 +364,9 @@ const Home = () => { 조회 수 많은 추천 클래스를 소개할게요!
-
{renderPickLectureList()}
+
+ {renderPickLectureList()} +
diff --git a/src/app/signup/page.tsx b/src/app/signup/page.tsx index d826539..23f9c76 100755 --- a/src/app/signup/page.tsx +++ b/src/app/signup/page.tsx @@ -6,8 +6,6 @@ import { BackToPrevious, Button, InputLabel, - RadioGroup, - RadioGroupItem, Select, SelectContent, SelectGroup, @@ -23,10 +21,10 @@ import { InputLabelStatus } from "@/shared/ui/InputLabel/InputLabel"; import { UserServiceAgreeDialog } from "@/entities/user/ui"; import axios from "axios"; import { debounce } from "lodash"; -import { toast } from "sonner"; import useGetRandomNickname from "@/entities/user/api/useGetRandomNickname"; import usePostNickname from "@/entities/user/api/usePostNickname"; import { useRouter } from "next/navigation"; +import { useToast } from "@/shared/hooks/useToast"; import useValidateNickname from "@/entities/user/api/useValidateNickname"; import { userAgeList } from "@/entities/user/model/user"; @@ -56,6 +54,7 @@ const SignUpPage = () => { const getRandomNickname = useGetRandomNickname(); const validateNickname = useValidateNickname(); const postNickname = usePostNickname(); + const { toast } = useToast(); const makeRandomNickname = () => { getRandomNickname.mutate(undefined, { @@ -115,7 +114,7 @@ const SignUpPage = () => { }, { onSuccess: () => { - toast("닉네임이 성공적으로 업데이트됐어요"); + toast({ title: "시ː작에 오신 걸 환영합니다." }); router.push("/"); }, }, diff --git a/src/app/user/[id]/page.tsx b/src/app/user/[id]/page.tsx index b909bc7..c63bafe 100755 --- a/src/app/user/[id]/page.tsx +++ b/src/app/user/[id]/page.tsx @@ -2,27 +2,21 @@ import { BackToPrevious, Button, InputLabel, UnifiedDialog } from "@/shared/ui"; import { Controller, SubmitHandler, useForm } from "react-hook-form"; -import { - LoginUserInfo, - PatchUserAddress, - userAgeMap, -} from "@/entities/user/model/user"; +import { LoginUserInfo, PatchUserAddress } from "@/entities/user/model/user"; import { debounce, isEmpty } from "lodash"; import { useEffect, useState } from "react"; -import Image from "next/image"; import { InputLabelStatus } from "@/shared/ui/InputLabel/InputLabel"; import { SquareLoader } from "react-spinners"; import axios from "axios"; import { deleteCookie } from "cookies-next"; -import { toast } from "sonner"; import { useGeoLocation } from "@/shared/lib/useGeolocation"; import useGetLoginUserInfo from "@/entities/user/api/useGetLoginUserInfo"; -import usePatchUserAddress from "@/entities/user/api/usePatchUserAddress"; import usePatchUserInfo from "@/entities/user/api/usePatchUserInfo"; import usePostLogout from "@/features/authentication/api/usePostLogout"; import { useQueryClient } from "@tanstack/react-query"; import { useRouter } from "next/navigation"; +import { useToast } from "@/shared/hooks/useToast"; import useValidateNickname from "@/entities/user/api/useValidateNickname"; export const runtime = "edge"; @@ -77,6 +71,8 @@ const UserInfoPage = () => { const queryClient = useQueryClient(); + const { toast } = useToast(); + const validationCheckNickname = debounce((nickname: string) => { validateNickname.mutate( { nickname }, @@ -138,7 +134,7 @@ const UserInfoPage = () => { }, { onSuccess: () => { - toast("유저 정보 업데이트가 성공적으로 됐어요."); + toast({ title: "닉네임이 변경 완료됐습니다." }); window.location.reload(); }, }, @@ -150,7 +146,7 @@ const UserInfoPage = () => { onSuccess: () => { deleteCookie("accessToken"); deleteCookie("refreshToken"); - toast("로그아웃 성공"); + toast({ title: "다음에 또 봐요~!" }); queryClient.clear(); router.push("/"); }, diff --git a/src/entities/lecture/ui/LectureCard/HomeLectureCard/HomeLectureCard.tsx b/src/entities/lecture/ui/LectureCard/HomeLectureCard/HomeLectureCard.tsx index 7583ea1..cedc54b 100755 --- a/src/entities/lecture/ui/LectureCard/HomeLectureCard/HomeLectureCard.tsx +++ b/src/entities/lecture/ui/LectureCard/HomeLectureCard/HomeLectureCard.tsx @@ -106,9 +106,7 @@ const HomeLectureCard = (props: HomeLectureCardProps) => { lectureId: id, }, { - onSuccess: () => { - toast("찜한 클래스를 삭제했어요"); - }, + onSuccess: () => {}, onError: () => { setHeart(true); }, @@ -122,9 +120,7 @@ const HomeLectureCard = (props: HomeLectureCardProps) => { lectureId: id, }, { - onSuccess: () => { - toast("클래스를 찜 했어요"); - }, + onSuccess: () => {}, onError: () => { setHeart(false); }, @@ -162,12 +158,12 @@ const HomeLectureCard = (props: HomeLectureCardProps) => { const dialogContent = () => { return ( -
+
-
+
로그인이 필요한
-
서비스에요
+
서비스에요