@@ -20,14 +20,15 @@ import {
2020 TableRow ,
2121 TablePagination ,
2222 Link ,
23- CircularProgress ,
2423 Alert ,
2524 Tabs ,
2625 Tab ,
2726 Select ,
2827 MenuItem ,
2928 FormControl ,
3029 InputLabel ,
30+ Skeleton ,
31+ Typography ,
3132} from "@mui/material" ;
3233import { useTheme } from "@mui/material/styles" ;
3334import { useGitHubAuth } from "../../hooks/useGitHubAuth" ;
@@ -278,11 +279,62 @@ const Home: React.FC = () => {
278279 ) }
279280
280281 { loading ? (
281- < Box display = "flex" justifyContent = "center" my = { 4 } >
282- < CircularProgress />
283- </ Box >
284- ) : (
285- < Box sx = { { maxHeight : "400px" , overflowY : "auto" } } >
282+ < Box sx = { { maxHeight : "400px" , overflowY : "auto" } } >
283+ < TableContainer component = { Paper } >
284+ < Table size = "small" >
285+ < TableHead >
286+ < TableRow >
287+ < TableCell > Title</ TableCell >
288+ < TableCell align = "center" > Repository</ TableCell >
289+ < TableCell align = "center" > State</ TableCell >
290+ < TableCell > Created</ TableCell >
291+ </ TableRow >
292+ </ TableHead >
293+
294+ < TableBody >
295+ { [ ...Array ( 5 ) ] . map ( ( _ , index ) => (
296+ < TableRow key = { index } >
297+ < TableCell >
298+ < Skeleton variant = "text" width = "80%" height = { 30 } />
299+ </ TableCell >
300+
301+ < TableCell align = "center" >
302+ < Skeleton variant = "text" width = "60%" height = { 30 } />
303+ </ TableCell >
304+
305+ < TableCell align = "center" >
306+ < Skeleton variant = "rounded" width = { 70 } height = { 25 } />
307+ </ TableCell >
308+
309+ < TableCell >
310+ < Skeleton variant = "text" width = "70%" height = { 30 } />
311+ </ TableCell >
312+ </ TableRow >
313+ ) ) }
314+ </ TableBody >
315+ </ Table >
316+ </ TableContainer >
317+ </ Box >
318+ ) : ! authError && ! dataError && currentFilteredData . length === 0 ? (
319+ < Paper
320+ elevation = { 1 }
321+ sx = { {
322+ p : 4 ,
323+ textAlign : "center" ,
324+ backgroundColor : theme . palette . background . paper ,
325+ } }
326+ >
327+ < Typography variant = "h6" gutterBottom >
328+ No Data Found
329+ </ Typography >
330+
331+ < Typography variant = "body2" color = "text.secondary" >
332+ Try adjusting filters or searching for another GitHub user.
333+ </ Typography >
334+ </ Paper >
335+ ) : (
336+
337+ < Box sx = { { maxHeight : "400px" , overflowY : "auto" } } >
286338
287339 < TableContainer component = { Paper } >
288340
0 commit comments