Skip to content

Commit

Permalink
fix: change accepted pr icon to merged pr icon (#2057)
Browse files Browse the repository at this point in the history
  • Loading branch information
itskish0re authored Nov 7, 2023
1 parent cc93f2c commit d83f854
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
14 changes: 7 additions & 7 deletions components/molecules/HighlightCard/highlight-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { HiArrowPath } from "react-icons/hi2";
import Card from "components/atoms/Card/card";
import SkeletonWrapper from "components/atoms/SkeletonLoader/skeleton-wrapper";
import repoIcon from "../../../img/icons/icon-repo--blue.svg";
import prIcon from "../../../img/icons/icon-pr--green.svg";
import mergedPrIcon from "../../../img/icons/icon-merged-pr--purple.svg";
import personIcon from "../../../img/icons/person-icon.svg";
import labelIcon from "../../../img/icons/icon-label--blue.svg";
import thumbsIcon from "../../../img/icons/icon-thumbs-down--yellow.svg";
Expand All @@ -18,7 +18,7 @@ interface HighlightCardProps {
label?: string;
icon:
| "participation"
| "accepted-pr"
| "merged-pr"
| "unlabeled-pr"
| "spam"
| "contributors"
Expand Down Expand Up @@ -59,10 +59,10 @@ const icons: IconMap = {
label: "Participation",
color: "bg-blue-100",
},
"accepted-pr": {
src: prIcon.src,
label: "Accepted PRs",
color: "bg-green-100",
"merged-pr": {
src: mergedPrIcon.src,
label: "Merged PRs",
color: "bg-purple-200",
},
"unlabeled-pr": {
src: labelIcon.src,
Expand Down Expand Up @@ -146,7 +146,7 @@ const HighlightCard: React.FC<HighlightCardProps> = ({
{/* Label: Icon */}
<div
className={`w-8 h-8 flex justify-center items-center ${
icon ? icons[icon].color : "bg-slate-100"
icon ? icons[icon]["color"] : "bg-slate-100"
} rounded-full`}
>
{getIcon(icon)}
Expand Down
4 changes: 2 additions & 2 deletions components/organisms/Dashboard/dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ const Dashboard = ({ repositories }: DashboardProps): JSX.Element => {
isLoading={isLoading}
/>
<HighlightCard
label="Accepted PRs"
icon="accepted-pr"
label="Merged PRs"
icon="merged-pr"
metricIncreases={compare1.acceptedTotal - compare2.acceptedTotal >= 0}
increased={compare1.acceptedTotal - compare2.acceptedTotal >= 0}
numChanged={humanizeNumber(Math.abs(compare1.acceptedTotal - compare2.acceptedTotal), "abbreviation")}
Expand Down
13 changes: 13 additions & 0 deletions img/icons/icon-merged-pr--purple.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d83f854

Please sign in to comment.