diff --git a/frontend/src/components/MyInfo/UpdateMyInfo.tsx b/frontend/src/components/MyInfo/UpdateMyInfo.tsx index 525d907b..c40e713c 100644 --- a/frontend/src/components/MyInfo/UpdateMyInfo.tsx +++ b/frontend/src/components/MyInfo/UpdateMyInfo.tsx @@ -6,6 +6,7 @@ import { ProfileProps } from '../../types/Profile'; import Button from '../common/Button'; import Text from '../common/Text'; import usePatch from '../../apiHooks/usePatch'; +import useToast from '../../hooks/useToast'; interface UpdateMyInfoProps { myInfo: ProfileProps; @@ -19,6 +20,7 @@ const UpdateMyInfo = ({ setMyInfo, }: UpdateMyInfoProps) => { const { fetchPatch } = usePatch(); + const { showToast } = useToast(); const onChangeMyInfoName = (e: React.ChangeEvent) => { if (e.target.value.length >= 20) return; @@ -32,10 +34,10 @@ const UpdateMyInfo = ({ nickName: myInfo.nickName, }, errorMessage: '회원정보 수정에 실패했습니다.', - isThrow: true, onSuccess: () => { localStorage.setItem('user', JSON.stringify(myInfo)); setIsModifyMyInfo(false); + showToast('info', '회원정보를 수정했습니다.'); }, }); }; @@ -48,7 +50,7 @@ const UpdateMyInfo = ({ $justifyContent="center" $alignItems="center" > - + diff --git a/frontend/src/components/MyInfo/index.tsx b/frontend/src/components/MyInfo/index.tsx index db15d04d..e68df6a6 100644 --- a/frontend/src/components/MyInfo/index.tsx +++ b/frontend/src/components/MyInfo/index.tsx @@ -21,7 +21,7 @@ const MyInfo = () => { const [myInfo, setMyInfo] = useState({ nickName: user.nickName, email: user.email, - image: user.imageUrl, + imageUrl: user.imageUrl, }); const onClickSetting = () => { diff --git a/frontend/src/constants/index.ts b/frontend/src/constants/index.ts index b55fff9d..9b12e60b 100644 --- a/frontend/src/constants/index.ts +++ b/frontend/src/constants/index.ts @@ -7,4 +7,4 @@ export const LAYOUT_PADDING = '40px'; export const DEFAULT_TOPIC_IMAGE = 'https://velog.velcdn.com/images/semnil5202/post/37f3bcb9-0b07-4100-85f6-f1d5ad037c14/image.svg'; -export const DEFAULT_PROD_URL = 'https://mapbefine.kro.kr/api'; +export const DEFAULT_PROD_URL = 'https://mapbefine.com/api'; diff --git a/frontend/src/pages/Home.tsx b/frontend/src/pages/Home.tsx index b14bbd26..5ca139b9 100644 --- a/frontend/src/pages/Home.tsx +++ b/frontend/src/pages/Home.tsx @@ -14,7 +14,6 @@ const TopicListContainer = lazy( ); const Home = () => { - console.log(`${process.env.APP_URL}`, '환경변수 테스트'); const { routingHandlers } = useNavigator(); const { goToPopularTopics, goToLatestTopics, goToNearByMeTopics } = routingHandlers; diff --git a/frontend/src/types/Profile.ts b/frontend/src/types/Profile.ts index 825f40ef..124cf1c6 100644 --- a/frontend/src/types/Profile.ts +++ b/frontend/src/types/Profile.ts @@ -1,5 +1,5 @@ export interface ProfileProps { nickName: string; email: string; - image: string; + imageUrl: string; }