tweak codestats filtering
All checks were successful
Deploy Blog / deploy (push) Successful in 1m54s
All checks were successful
Deploy Blog / deploy (push) Successful in 1m54s
This commit is contained in:
parent
04950b84bb
commit
5ed2cbd87e
1 changed files with 96 additions and 91 deletions
|
|
@ -29,7 +29,11 @@ const CodeStats = () => {
|
|||
)
|
||||
|
||||
const personalProjects =
|
||||
data && data?.projects.filter((project) => !project.key.includes("gp-"))
|
||||
data &&
|
||||
data?.projects.filter(
|
||||
(project) =>
|
||||
!project.key.includes("gp-") && !project.key.includes("unknown")
|
||||
)
|
||||
|
||||
const personalProjectsSorted =
|
||||
personalProjects && personalProjects.sort((a, b) => b.total - a.total)
|
||||
|
|
@ -50,7 +54,8 @@ const CodeStats = () => {
|
|||
|
||||
const projectsChartData =
|
||||
personalProjects &&
|
||||
personalProjects.map((proj) => ({
|
||||
personalProjects
|
||||
.map((proj) => ({
|
||||
metric: proj.key,
|
||||
project: proj.key,
|
||||
hours: (proj.total / 3600).toFixed(1),
|
||||
|
|
@ -59,6 +64,7 @@ const CodeStats = () => {
|
|||
100
|
||||
).toFixed(1),
|
||||
}))
|
||||
.slice(0, 4)
|
||||
|
||||
return (
|
||||
<div className="container mx-auto p-4 grow">
|
||||
|
|
@ -73,7 +79,6 @@ const CodeStats = () => {
|
|||
{convertDateFriendly(data?.to)}
|
||||
</div>
|
||||
</div>
|
||||
{/* Score-cards */}
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
|
||||
<Scorecard
|
||||
title="time coding"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue