+
+ Project Stats
+
+ {error !== null ? (
+
{error}
+ ) : projectStats !== null ? (
+
+
+
+
+ Project Name |
+ Repository Link |
+ Commit Count |
+ Pull Count |
+ Lines Added |
+ Lines Removed |
+ Languages Used |
+
+
+
+ {projectStats.map((project) => (
+
+ {project.name} |
+ {project.repo_link} |
+ {project.commit_count} |
+ {project.pull_count} |
+ {project.lines_added} |
+ {project.lines_removed} |
+ {project.languages_used.join(", ")} |
+
+ ))}
+
+
+
+ ) : null}
+
+ );
+}
+
+export default ProjectStats;
diff --git a/src/util/types.ts b/src/util/types.ts
index 8b9cd673..16cbc8c3 100644
--- a/src/util/types.ts
+++ b/src/util/types.ts
@@ -78,6 +78,18 @@ export interface IEndpointTypes {
students: IStudentInfo[];
};
};
+ "stats/projects": {
+ request: null;
+ response: {
+ name: string;
+ repo_link: string;
+ commit_count: number;
+ pull_count: number;
+ lines_added: number;
+ lines_removed: number;
+ languages_used: string[];
+ }[];
+ };
[route: `project/${number}`]: {
request: null;
response: IProject;