@@ -3,7 +3,7 @@ import { Link } from 'react-router-dom';
33import { ArrowRightOutlined , EditTwoTone , MessageTwoTone , QuestionCircleFilled , StarTwoTone , UserOutlined } from '@ant-design/icons' ;
44import { createStyles } from 'antd-style' ;
55import { useEffect , useRef } from 'react' ;
6- import { BadgeControllerService , BaekjoonControllerService , KubernetesControllerService , MemberControllerService , queryKey , useAppMutation , useAppSuspenseQueries } from '~/lib/api-v2' ;
6+ import { BadgeControllerService , BaekjoonControllerService , KubernetesControllerService , MemberControllerService , queryKey , useAppMutation , useAppQuery , useAppSuspenseQueries } from '~/lib/api-v2' ;
77import { MENU } from '~/constants/menus' ;
88import MyPageGrassSection from '~/components/my-page/MyPageGrassSection' ;
99import { queryClient } from '~/lib/utils/queryClient' ;
@@ -42,7 +42,7 @@ export default function MyPageContainer({ locationHash }: { locationHash: string
4242 } ,
4343 ] ;
4444
45- const [ { data : myHour } , { data : me } , { data : badge } , { data : baekjoon } , { data : kubernetes } ] = useAppSuspenseQueries ( {
45+ const [ { data : myHour } , { data : me } , { data : badge } , { data : baekjoon } ] = useAppSuspenseQueries ( {
4646 queries : [
4747 {
4848 queryKey : queryKey . member . hour ,
@@ -60,13 +60,15 @@ export default function MyPageContainer({ locationHash }: { locationHash: string
6060 queryKey : queryKey . baekjoon . baekjoon ,
6161 queryFn : BaekjoonControllerService . getMyBaekjoonUsingGet ,
6262 } ,
63- {
64- queryKey : queryKey . kubernetes . me ,
65- queryFn : KubernetesControllerService . getMyKeyUsingGet ,
66- } ,
6763 ] ,
6864 } ) ;
6965
66+ const { data : kubernetes , isError : isKubernetesError } = useAppQuery ( {
67+ queryKey : queryKey . kubernetes . me ,
68+ queryFn : KubernetesControllerService . getMyKeyUsingGet ,
69+ retry : false ,
70+ } ) ;
71+
7072 const { mutate : selectBadge } = useAppMutation ( {
7173 mutationFn : BadgeControllerService . selectBadgeUsingPost ,
7274 } ) ;
@@ -199,7 +201,11 @@ export default function MyPageContainer({ locationHash }: { locationHash: string
199201 </ Space >
200202 < Space direction = "vertical" size = { 0 } className = { styles . wrapper } ref = { pksRef } >
201203 < Typography . Title level = { 5 } > PKS (PoolC Kubernetes Service)</ Typography . Title >
202- < MyPagePKSSection jwtToken = { kubernetes . key ?? '' } />
204+ { isKubernetesError ? (
205+ < Typography . Text type = "secondary" > 쿠버네티스 키가 아직 발급되지 않았습니다. 관리자에게 문의해주세요.</ Typography . Text >
206+ ) : kubernetes ?. key ? (
207+ < MyPagePKSSection jwtToken = { kubernetes . key } />
208+ ) : null }
203209 </ Space >
204210 </ Space >
205211 ) ;
0 commit comments