Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 31 additions & 4 deletions src/pages/Tracker/Tracker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
Alert,
Tabs,
Tab,
Skeleton,
Select,
MenuItem,
FormControl,
Expand Down Expand Up @@ -71,7 +72,7 @@ const Home: React.FC = () => {

const [tab, setTab] = useState(0);
const [page, setPage] = useState(0);

const [hasFetched, setHasFetched] = useState(false);
const [issueFilter, setIssueFilter] = useState("all");
const [prFilter, setPrFilter] = useState("all");
const [searchTitle, setSearchTitle] = useState("");
Expand All @@ -90,6 +91,7 @@ const Home: React.FC = () => {
e.preventDefault();
setPage(0);
fetchData(username, 1, ROWS_PER_PAGE);
setHasFetched(true);
};

const handlePageChange = (_: unknown, newPage: number) => {
Expand Down Expand Up @@ -331,8 +333,26 @@ const Home: React.FC = () => {
)}

{loading ? (
<Box display="flex" justifyContent="center" my={4}>
<CircularProgress />
<Box sx={{padding:2}}>
{[1,2,3,4,5].map((row)=>(
<Box
key={row}
sx={{
display:"flex",
marginBottom:2,
gap:2,
}}
>
<Skeleton variant="text" width={250}
height={35}/>
<Skeleton variant="rectangular" width={120}
height={35}/>
<Skeleton variant="rectangular" width={100}
height={35}/>
<Skeleton variant="rectangular" width={120}
height={35}/>
</Box>
))}
</Box>
) : (
<Box sx={{ maxHeight: "400px", overflowY: "auto" }}>
Expand All @@ -351,7 +371,14 @@ const Home: React.FC = () => {
</TableHead>

<TableBody>
{currentFilteredData.map((item) => (
{currentFilteredData.length === 0 && (
<TableRow>
<TableCell colSpan={4} align="center">
No GitHub activity found with current filters.
</TableCell>
</TableRow>
)}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
{hasFetched && currentFilteredData.map((item) => (
<TableRow key={item.id}>

<TableCell sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>
Expand Down