File tree Expand file tree Collapse file tree
mosu-app/src/pages/mypage/profile Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import { ButtonGroupFieldSet } from "@/shared/components/ButtonGroup";
2222import { ErrorMessage } from "@/shared/components/FieldMessage/ErrorMessage" ;
2323import { InputFieldSet } from "@/shared/components/Input" ;
2424import { SelectFieldSet } from "@/shared/components/SelectField" ;
25+ import { Spinner } from "@/shared/components/Spinner/Spinner" ;
2526import { ForbiddenException , HTTPException , UnauthorizedException } from "@/shared/errors/HTTPException" ;
2627import { logger } from "@/shared/lib/logger" ;
2728import { Button } from "@/shared/ui/button" ;
@@ -79,7 +80,7 @@ export default function MyPageProfilePage({ profileData }: InferGetServerSidePro
7980 }
8081 } , [ educationValue , setValue ] ) ;
8182
82- const { mutate } = useEditProfile ( ) ;
83+ const { isPending , mutate } = useEditProfile ( ) ;
8384
8485 const onSubmit = handleSubmit (
8586 ( data ) => {
@@ -203,8 +204,8 @@ export default function MyPageProfilePage({ profileData }: InferGetServerSidePro
203204 ) }
204205 </ div >
205206
206- < Button variant = "default" className = "my-10 h-[60px] w-full" >
207- 변경하기
207+ < Button variant = "default" className = "my-10 h-[60px] w-full" disabled = { isPending } >
208+ { isPending ? < Spinner /> : "프로필 수정하기" }
208209 </ Button >
209210 </ section >
210211 </ form >
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import { ButtonGroupFieldSet } from "@/shared/components/ButtonGroup";
2222import { ErrorMessage } from "@/shared/components/FieldMessage/ErrorMessage" ;
2323import { InputFieldSet } from "@/shared/components/Input" ;
2424import { SelectFieldSet } from "@/shared/components/SelectField" ;
25+ import { Spinner } from "@/shared/components/Spinner/Spinner" ;
2526import { ForbiddenException , HTTPException , UnauthorizedException } from "@/shared/errors/HTTPException" ;
2627import { logger } from "@/shared/lib/logger" ;
2728import { Button } from "@/shared/ui/button" ;
@@ -77,7 +78,7 @@ export default function MyPageProfilePage({ profileData }: InferGetServerSidePro
7778 }
7879 } , [ educationValue , setValue ] ) ;
7980
80- const { mutate } = useRegisterProfile ( ) ;
81+ const { isPending , mutate } = useRegisterProfile ( ) ;
8182
8283 const onSubmit = handleSubmit (
8384 ( data ) => {
@@ -206,8 +207,8 @@ export default function MyPageProfilePage({ profileData }: InferGetServerSidePro
206207 ) }
207208 </ div >
208209
209- < Button variant = "default" className = "my-10 h-[60px] w-full" >
210- 등록하기
210+ < Button variant = "default" className = "my-10 h-[60px] w-full" disabled = { isPending } >
211+ { isPending ? < Spinner /> : " 등록하기" }
211212 </ Button >
212213 </ section >
213214 </ form >
You can’t perform that action at this time.
0 commit comments