+
{data.reviewCount}
diff --git a/src/app/(profile)/(component)/ProfileUpdateForm.tsx b/src/app/(profile)/(component)/ProfileUpdateForm.tsx
index 7e00f6b5..7dae075b 100644
--- a/src/app/(profile)/(component)/ProfileUpdateForm.tsx
+++ b/src/app/(profile)/(component)/ProfileUpdateForm.tsx
@@ -4,7 +4,6 @@ import { useState } from 'react';
import { zodResolver } from '@hookform/resolvers/zod';
import { useSession } from 'next-auth/react';
-import { useErrorBoundary } from 'react-error-boundary';
import { Controller, useForm } from 'react-hook-form';
import { patchProfileInfo } from '@/actions/profile/patchProfileInfo';
@@ -17,7 +16,6 @@ import { useUserInfoStore } from '@/store/userInfoStore';
import { profileSchema, type ProfileFormValues } from '@/types/profile/profileUpdateSchema';
const ProfileUpdateForm = () => {
- const { showBoundary } = useErrorBoundary();
const { update } = useSession();
const closeModal = useModalStore((state) => state.closeModal);
const [isLoading, setIsLoading] = useState(false);
@@ -26,6 +24,8 @@ const ProfileUpdateForm = () => {
const description = useUserInfoStore((state) => state.description);
const image = useUserInfoStore((state) => state.image);
+ const [err, setError] = useState(false);
+
const {
register,
handleSubmit,
@@ -63,8 +63,8 @@ const ProfileUpdateForm = () => {
});
closeModal();
- } catch (err) {
- showBoundary(err);
+ } catch {
+ setError(true);
} finally {
setIsLoading(false);
}
@@ -86,6 +86,9 @@ const ProfileUpdateForm = () => {
maxLength={10}
defaultValue={nickname}
{...register('nickname')}
+ setError={setError}
+ errorMessage={err ? ' ' : ''}
+ className={err ? 'animate-shake' : ''}
/>
{
{...register('description')}
/>
-
diff --git a/src/app/(profile)/(component)/StatisticsCard.tsx b/src/app/(profile)/(component)/StatisticsCard.tsx
index 19adaf0d..558fae68 100644
--- a/src/app/(profile)/(component)/StatisticsCard.tsx
+++ b/src/app/(profile)/(component)/StatisticsCard.tsx
@@ -7,7 +7,7 @@ interface Props {
const ActivityCard = ({ title, children }: Props) => {
return (
-