+
+ Project Stats
+
+ {error !== null ? (
+
{error}
+ ) : projectStats !== null ? (
+
+
+
+
+ Project Name |
+ Repository Link |
+ Commit Count |
+ Pull Count |
+ {/* Add more columns as needed */}
+
+
+
+ {projectStats.projects.map((project) => (
+
+ {project.name} |
+ {project.repo_link} |
+ {project.commit_count} |
+ {project.pull_count} |
+ {/* Add more cells as needed */}
+
+ ))}
+
+
+
+ ) : (
+ null
+ )}
+
+ );
+}
+
+export default ProjectStats;
diff --git a/src/util/types.ts b/src/util/types.ts
index 8b9cd673..ee4ed2b9 100644
--- a/src/util/types.ts
+++ b/src/util/types.ts
@@ -78,6 +78,16 @@ export interface IEndpointTypes {
students: IStudentInfo[];
};
};
+ "stats/projects": {
+ request: null;
+ response: {
+ name: string;
+ username: string;
+ email: string;
+ projects: IProjectDashboardInfo[];
+ students: IStudentInfo[];
+ };
+ };
[route: `project/${number}`]: {
request: null;
response: IProject;