diff --git a/src/pages/profile/profile.tsx b/src/pages/profile/profile.tsx index 564a5314..c1e0b0eb 100644 --- a/src/pages/profile/profile.tsx +++ b/src/pages/profile/profile.tsx @@ -17,7 +17,7 @@ const Profile = () => { if (!data) return null; return ( -
+
{ target="_blank" rel="noopener noreferrer" aria-label="문의하기" - className="cap_14_m py-[0.8rem] text-gray-800" + className="cap_14_m py-[0.8rem] text-gray-300" > 문의하기 @@ -43,16 +43,16 @@ const Profile = () => { target="_blank" rel="noopener noreferrer" aria-label="의견 보내기" - className="cap_14_m py-[0.8rem] text-gray-800" + className="cap_14_m py-[0.8rem] text-gray-300" > 의견 보내기 - + diff --git a/src/shared/apis/user/user-queries.ts b/src/shared/apis/user/user-queries.ts index 1f4ace60..d817b02a 100644 --- a/src/shared/apis/user/user-queries.ts +++ b/src/shared/apis/user/user-queries.ts @@ -2,6 +2,7 @@ import { get } from '@apis/base/http'; import { END_POINT } from '@constants/api'; import { USER_KEY } from '@constants/query-key'; import { queryOptions } from '@tanstack/react-query'; +import type { ApiResponse } from '@/shared/types/base-types'; import type { getMatchConditionResponse, getUserInfoResponse } from '@/shared/types/user-types'; export const userQueries = { @@ -16,12 +17,52 @@ export const userQueries = { USER_INFO: () => queryOptions({ queryKey: USER_KEY.INFO(), - queryFn: () => get(END_POINT.GET_USER_INFO), + queryFn: async () => { + const res = await get>( + END_POINT.GET_USER_INFO, + ); + + if ( + typeof res === 'object' && + res !== null && + 'status' in res && + 'message' in res && + 'data' in res + ) { + if (!res.data) { + throw new Error('유저 정보 응답 데이터가 없습니다.'); + } + + return res.data; + } + + return res as getUserInfoResponse; + }, }), MATCH_CONDITION: () => queryOptions({ queryKey: USER_KEY.MATCH_CONDITION(), - queryFn: () => get(END_POINT.MATCH_CONDITION), + queryFn: async () => { + const res = await get>( + END_POINT.MATCH_CONDITION, + ); + + if ( + typeof res === 'object' && + res !== null && + 'status' in res && + 'message' in res && + 'data' in res + ) { + if (!res.data) { + throw new Error('매칭 조건 응답 데이터가 없습니다.'); + } + + return res.data; + } + + return res as getMatchConditionResponse; + }, }), }; diff --git a/src/shared/components/bottom-navigation/bottom-navigation.tsx b/src/shared/components/bottom-navigation/bottom-navigation.tsx index c4aaa9ce..28967983 100644 --- a/src/shared/components/bottom-navigation/bottom-navigation.tsx +++ b/src/shared/components/bottom-navigation/bottom-navigation.tsx @@ -8,7 +8,7 @@ import { ROUTES } from '@routes/routes-config'; import { useMutation, useQuery } from '@tanstack/react-query'; import { useLocation, useNavigate } from 'react-router-dom'; -const DARK_NAV_PATHS = [ROUTES.HOME, ROUTES.MATCH, ROUTES.CHAT]; +const DARK_NAV_PATHS = [ROUTES.HOME, ROUTES.MATCH, ROUTES.CHAT, ROUTES.PROFILE]; const BottomNavigation = () => { const { pathname } = useLocation(); diff --git a/src/shared/components/footer/footer.tsx b/src/shared/components/footer/footer.tsx index b557333d..a74cdbd7 100644 --- a/src/shared/components/footer/footer.tsx +++ b/src/shared/components/footer/footer.tsx @@ -17,19 +17,19 @@ const Footer = () => { })} >
- -
+ +

대표 정윤지

이메일 mateball0615@gmail.com

-
+
개인정보처리방침 @@ -37,7 +37,7 @@ const Footer = () => { href={EXTERNAL_LINKS.TERMS_OF_SERVICE} target="_blank" rel="noopener noreferrer" - className="cap_12_m text-gray-800" + className="cap_12_m text-gray-500" > 이용약관 diff --git a/src/shared/components/header/header.tsx b/src/shared/components/header/header.tsx index 43544dc2..3f31216a 100644 --- a/src/shared/components/header/header.tsx +++ b/src/shared/components/header/header.tsx @@ -22,11 +22,12 @@ const Header = ({ headerTitle }: HeaderProps) => { const isEditProfile = pathname === ROUTES.PROFILE_EDIT; const isGame = Boolean(matchPath('/game/:date/:gameId', pathname)); const isMemberDetail = Boolean(matchPath(ROUTES.MATCH_MEMBER_DETAIL(), pathname)); + const isProfile = pathname === ROUTES.PROFILE; return (
마이페이지; + return

마이페이지

; } if (pathname === ROUTES.CHAT) {