diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 37d2f8d3..107acf01 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -3,6 +3,7 @@ import '@/styles/globals.css'; import type { AppProps } from 'next/app'; import { HydrationBoundary, QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { ReactQueryDevtools } from '@tanstack/react-query-devtools'; +import Toaster from '@/components/ui/toaster'; export default function App({ Component, pageProps }: AppProps) { const [queryClient] = React.useState(() => new QueryClient()); @@ -10,6 +11,7 @@ export default function App({ Component, pageProps }: AppProps) { + diff --git a/src/user/ui-profile/ProfileEdit.tsx b/src/user/ui-profile/ProfileEdit.tsx index 144d6926..1a969b6c 100644 --- a/src/user/ui-profile/ProfileEdit.tsx +++ b/src/user/ui-profile/ProfileEdit.tsx @@ -9,6 +9,7 @@ import { Form, Formik, useFormik } from 'formik'; import { useCreatePresignedUrl, useUpdateMe } from '@/hooks/userQueryHooks'; import * as Yup from 'yup'; import fileNameChange from '../util/fileNameChange'; +import { useToast } from '@/components/ui/use-toast'; interface UserProfileEditProps { initialValues: { @@ -26,6 +27,8 @@ export default function ProfileEdit({ initialValues, onModalClose }: UserProfile const createPresignedUrl = useCreatePresignedUrl(); const fileInputRef = useRef(null); + const { toast } = useToast(); + const handleSubmit = async () => { await formik.submitForm(); // Formik의 submitForm 함수 호출 }; @@ -33,6 +36,9 @@ export default function ProfileEdit({ initialValues, onModalClose }: UserProfile const { mutate: updateMe } = useUpdateMe({ onSuccess: () => { onModalClose(); + toast({ + description: '프로필 수정이 완료되었습니다.', + }); }, });