File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
src/app/(pages)/test-page Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ // }
2+ 'use client'
3+
4+ import { useEffect , useState } from 'react'
5+
6+ import { TeamListItem } from '@/types/api/team.types'
7+ import { useTeamRecruitmentList } from 'queries/team/useTeamList'
8+
9+
10+ // }
11+
12+ // }
13+
14+ // }
15+
16+ export default function Page ( ) : JSX . Element {
17+ const { data : teamList , isLoading, error } = useTeamRecruitmentList ( )
18+ if ( isLoading ) {
19+ return < p > Loading...</ p >
20+ }
21+
22+ if ( error ) {
23+ return < p > { error . message } </ p >
24+ }
25+
26+ return (
27+ < div >
28+ < ul >
29+ { teamList ?. map ( ( team : TeamListItem ) => (
30+ < li key = { team . id } >
31+ < h2 > { team . teamTitle } </ h2 >
32+ < p > { team . teamContent } </ p >
33+ < h3 > { team . teamIsActive } </ h3 >
34+ < h3 > { team . member . nickname } </ h3 >
35+ </ li >
36+ ) ) }
37+ </ ul >
38+ </ div >
39+ )
40+ }
You can’t perform that action at this time.
0 commit comments