-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FEAT: added the pull request analysis counter
- Loading branch information
1 parent
6a57a3e
commit bad8e0f
Showing
5 changed files
with
99 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import React, { useState } from "react"; | ||
import { DonutChart, Card, Title } from "@tremor/react"; | ||
import { PullRequestAnalysis } from "@/Interface/api.interface"; | ||
import { RoughNotation } from "react-rough-notation"; | ||
|
||
const PullRequestProgress: React.FC<PullRequestAnalysis> = ({ | ||
OpenCount, | ||
ClosedCount, | ||
}) => { | ||
const valueFormatter = (value: number) => `${value}%`; | ||
const [show, setShow] = useState(true); | ||
|
||
const openCount = typeof OpenCount === "number" ? OpenCount : 0; | ||
const closedCount = typeof ClosedCount === "number" ? ClosedCount : 0; | ||
|
||
const chartData = [ | ||
{ name: "Open Count", value: openCount }, | ||
{ name: "Closed Count", value: closedCount }, | ||
]; | ||
|
||
return ( | ||
<div className="pullRequestCard relative group items-start justify-center ml-16"> | ||
<div className="pullReqGradientBack w-full absolute -inset-0.5 bg-gradient-to-r from-purple-600 to-indigo-600 blur opacity-75 group-hover:opacity-100 transition duration-1000 group-hover:duration-500 animate-pulse"></div> | ||
<Card className="pullRequestCard"> | ||
<RoughNotation type="underline" show={show} color="green" strokeWidth={5}> | ||
{" "} | ||
<Title className="pullRequestTitle font-mono"> | ||
Pull Request Analysis | ||
</Title> | ||
</RoughNotation> | ||
|
||
<DonutChart | ||
className="mt-4 h-28" | ||
data={chartData} | ||
category="value" | ||
index="name" | ||
valueFormatter={valueFormatter} | ||
colors={["rose", "yellow"]} | ||
/> | ||
</Card> | ||
</div> | ||
); | ||
}; | ||
|
||
export default PullRequestProgress; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import Image from "next/image"; | ||
import VersionDashboard from "./Dashboard/page"; | ||
|
||
import "../Styles/Dashboard/followerProgress.css" | ||
|
||
|
||
export default function Home() { | ||
return ( | ||
<h1>nkn</h1> | ||
|
||
<VersionDashboard/> | ||
|
||
); | ||
} |