Skip to content

Commit

Permalink
✨ feat: 앱 내 언어 변경 api 연결 #73
Browse files Browse the repository at this point in the history
  • Loading branch information
hyeona01 committed Oct 30, 2024
1 parent 6980f35 commit 43dd06b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/pages/LanguageSetting/LanguageSettingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@ import Dropdown from '@/components/Common/Dropdown';
import { languageList } from '@/constants/information';
import { useState } from 'react';
import useNavigateBack from '@/hooks/useNavigateBack';
import { usePatchUserLanguage } from '@/hooks/api/useSetting';
import { UserLanguageRequest } from '@/types/api/mypage';

const LanguageSettingPage = () => {
const [language, setLanguage] = useState<string>('English');
const navigate = useNavigate();
const [language, setLanguage] = useState<string>('Select Language');

const { mutate } = usePatchUserLanguage();

const handleBackButtonClick = useNavigateBack();

const handleSaveButton = () => {
// API - 3.8 (유학생) 앱 내 언어 수정
navigate('/profile');
mutate({ language: language.toUpperCase() } as UserLanguageRequest);
};

return (
Expand Down

0 comments on commit 43dd06b

Please sign in to comment.