File tree Expand file tree Collapse file tree 5 files changed +23
-7
lines changed
_components/UniversityScreen Expand file tree Collapse file tree 5 files changed +23
-7
lines changed Original file line number Diff line number Diff line change 11import { AxiosResponse } from "axios" ;
22
3- import { axiosInstance } from "@/utils/axiosInstance" ;
3+ import { publicAxiosInstance } from "@/utils/axiosInstance" ;
44
55import { QueryKeys } from "./QueryKeys" ;
66
@@ -14,15 +14,15 @@ interface UseGetPostListProps {
1414}
1515
1616const getPostList = ( boardCode : string , category : string | null = null ) : Promise < AxiosResponse < ListPost [ ] > > =>
17- axiosInstance . get ( `/boards/${ boardCode } ` , {
17+ publicAxiosInstance . get ( `/boards/${ boardCode } ` , {
1818 params : {
1919 category,
2020 } ,
2121 } ) ;
2222
2323const useGetPostList = ( { boardCode, category = null } : UseGetPostListProps ) => {
2424 return useQuery ( {
25- queryKey : [ QueryKeys . postList ] ,
25+ queryKey : [ QueryKeys . postList , boardCode , category ] ,
2626 queryFn : ( ) => getPostList ( boardCode , category ) ,
2727 // staleTime을 무한으로 설정하여 불필요한 자동 refetch를 방지합니다.
2828 staleTime : Infinity ,
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ const CommunityPageContent = ({ boardCode }: CommunityPageContentProps) => {
2121 const router = useRouter ( ) ;
2222 const [ category , setCategory ] = useState < string | null > ( "전체" ) ;
2323
24- const { data : posts = [ ] } = useGetPostList ( { boardCode } ) ;
24+ const { data : posts = [ ] } = useGetPostList ( { boardCode, category } ) ;
2525
2626 const handleBoardChange = ( newBoard : string ) => {
2727 router . push ( `/community/${ newBoard } ` ) ;
Original file line number Diff line number Diff line change @@ -75,9 +75,17 @@ const MyProfileContent = () => {
7575 < div className = "w-full cursor-pointer rounded-lg bg-secondary-500 py-2 text-center font-medium text-white" >
7676 < Link href = { "/my/modify" } > 프로필 변경</ Link >
7777 </ div >
78- < Link className = "w-full" href = { "/my/apply-mentor" } >
78+ { /* <Link className="w-full" href={"/my/apply-mentor"}>
7979 <button className="w-full rounded-lg bg-secondary-800 py-2 font-medium text-white">멘토 회원 전환</button>
80- </ Link >
80+ </Link> */ }
81+ < button
82+ onClick = { ( ) => {
83+ toast . info ( "조금만 기다려주세요. [업데이트 중]" ) ;
84+ } }
85+ className = "w-full rounded-lg bg-secondary-800 py-2 font-medium text-white"
86+ >
87+ 멘토 회원 전환
88+ </ button >
8189 </ div >
8290 ) }
8391 </ div >
Original file line number Diff line number Diff line change @@ -191,6 +191,7 @@ const UniversityScreen = ({ onNext }: UniversityScreenProps) => {
191191 주세요.
192192 </ li >
193193 < li > 실명을 제외한 개인정보는 모두 가려주세요.</ li >
194+ < li > 업로드 가능한 파일 유형은 [png, jpg, pdf] 입니다.</ li >
194195 </ ul >
195196 </ div >
196197 </ div >
Original file line number Diff line number Diff line change 11"use client" ;
22
3+ import { useRouter } from "next/navigation" ;
34import { useState } from "react" ;
45import { FormProvider , useForm } from "react-hook-form" ;
56
@@ -17,6 +18,7 @@ import { toast } from "@/lib/zustand/useToastStore";
1718import { zodResolver } from "@hookform/resolvers/zod" ;
1819
1920const ApplyMentorPage = ( ) => {
21+ const router = useRouter ( ) ;
2022 const [ step , setStep ] = useState < number > ( 1 ) ;
2123
2224 const methods = useForm < MentorApplicationFormData > ( {
@@ -34,7 +36,12 @@ const ApplyMentorPage = () => {
3436 const { mutate : postMentorApplication } = usePostMentorApplication ( ) ;
3537
3638 const goNextStep = ( ) => setStep ( ( prev ) => prev + 1 ) ;
37- const goPrevStep = ( ) => setStep ( ( prev ) => Math . max ( 1 , prev - 1 ) ) ;
39+ const goPrevStep = ( ) => {
40+ if ( step === 1 ) {
41+ router . back ( ) ;
42+ }
43+ setStep ( ( prev ) => Math . max ( 1 , prev - 1 ) ) ;
44+ } ;
3845
3946 const progress = ( ( step - 1 ) / 3 ) * 100 ;
4047
You can’t perform that action at this time.
0 commit comments