-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#195 Issue:Project Stats Page #231
base: truth-redefined-again
Are you sure you want to change the base?
#195 Issue:Project Stats Page #231
Conversation
@pranjal3060 is attempting to deploy a commit to the kossiitkgp Team on Vercel. A member of the Team first needs to authorize it. |
src/pages/ProjectStat.tsx
Outdated
import { makeRequest } from "../util/backend"; | ||
import { useAuthContext } from "../util/auth"; | ||
import { IEndpointTypes } from "../util/types"; | ||
//import { Console } from "console"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove unused code.
src/pages/ProjectStat.tsx
Outdated
const [error, setError] = useState<string | null>(null); | ||
|
||
// Access the project ID from the route parameters | ||
const { } = useParams(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, unused.
src/pages/ProjectStat.tsx
Outdated
// Make a request to the specific project stats endpoint | ||
makeRequest("stats/projects", "get", null, authContext.jwt) | ||
.then((response) => { | ||
console.log(response) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logging the response is not necessary.
src/pages/ProjectStat.tsx
Outdated
<td>{project.repo_link}</td> | ||
<td>{project.commit_count}</td> | ||
<td>{project.pull_count}</td> | ||
{/* Add more cells as needed */} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any data left?
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
import { IEndpointTypes } from "../util/types"; | ||
import { useAuthContext } from "../util/auth"; | ||
|
||
// ... (imports) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// ... (imports) |
pull_count: number; | ||
lines_added: number; | ||
lines_removed: number; | ||
languages_used: string[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not returned by the endpoint.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you rename the file to ProjectStats.tsx
?
<tbody> | ||
{projectStats.map((project) => ( | ||
<tr key={project.repo_link}> | ||
<td>{project.name}</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to display the name as a link to the repo.
{projectStats.map((project) => ( | ||
<tr key={project.repo_link}> | ||
<td>{project.name}</td> | ||
<td>{project.repo_link}</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This field won't be required.
No description provided.