@@ -11,6 +11,9 @@ import {
1111 SelectTrigger ,
1212 SelectValue ,
1313} from "@/components/ui/select" ;
14+ import loading from "@/assets/images/loading.gif" ;
15+ import Image from "next/image" ;
16+
1417import { type Team } from "@/data/schema" ;
1518import { useQuery } from "@tanstack/react-query" ;
1619import { type ColumnDef } from "@tanstack/react-table" ;
@@ -26,8 +29,15 @@ export default function TeamsIdeasTable() {
2629 const [ searchTerm , setSearchTerm ] = useState ( "" ) ;
2730 const [ currentPage , setCurrentPage ] = useState ( 0 ) ;
2831 const [ selectedTrack , setSelectedTrack ] = useState < string > ( "" ) ;
29- const [ availableTracks , setAvailableTracks ] = useState < string [ ] > ( [ ] ) ;
30-
32+ const tracks = [
33+ "Media and Entertainment" ,
34+ "Finance and Fintech" ,
35+ "Healthcare and Education" ,
36+ "Digital Security" ,
37+ "Environment and Sustainability" ,
38+ "Environment and Sustainability" ,
39+ "Open Innovation" ,
40+ ] ;
3141 const {
3242 data : ideasData ,
3343 isLoading : ideasLoading ,
@@ -106,7 +116,15 @@ export default function TeamsIdeasTable() {
106116 if ( ideasLoading ) {
107117 return (
108118 < div className = "flex justify-center p-8" >
109- < div className = "text-lg" > Loading teams and submissions...</ div >
119+ < div className = "flex justify-center" >
120+ < Image
121+ className = "w-[50%]"
122+ src = { loading }
123+ width = { 100 }
124+ height = { 100 }
125+ alt = "Loading..."
126+ />
127+ </ div > { " " }
110128 </ div >
111129 ) ;
112130 }
@@ -144,8 +162,8 @@ export default function TeamsIdeasTable() {
144162 </ SelectTrigger >
145163 < SelectContent >
146164 < SelectItem value = "all" > All Tracks</ SelectItem >
147- { availableTracks . map ( ( track ) => (
148- < SelectItem key = { track } value = { track } >
165+ { tracks . map ( ( track , index ) => (
166+ < SelectItem key = { track } value = { String ( index ) } >
149167 { track }
150168 </ SelectItem >
151169 ) ) }
0 commit comments