Skip to content

Commit

Permalink
refactor: plugged back for assigned by user card (#656)
Browse files Browse the repository at this point in the history
  • Loading branch information
haydencleary authored Nov 18, 2024
1 parent e994528 commit 2a51299
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import { SocialIconLink } from "@/shared/features/social-link/social-icon-link/s
import { UserCardProps } from "./user-card.types";

export function UserCard({ title, user }: UserCardProps) {
if (!user) return null;

return (
<Paper
size={"lg"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ import { TypoPort } from "@/design-system/atoms/typo";

export interface UserCardProps {
title?: TypoPort<"span">;
user: UserPublicInterface;
user?: Pick<UserPublicInterface, "avatarUrl" | "login" | "contacts">;
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { GithubComment } from "@/shared/panels/contribution-sidepanel/_features/
import { IssueAppliedKpi } from "@/shared/panels/contribution-sidepanel/_features/issue-applied-kpi/issue-applied-kpi";
import { IssueOverview } from "@/shared/panels/contribution-sidepanel/_features/issue-overview/issue-overview";
import { LinkedIssues } from "@/shared/panels/contribution-sidepanel/_features/linked-issues/linked-issues";
import { UserCard } from "@/shared/panels/contribution-sidepanel/_features/user-card/user-card";
import { ContributionsPanelData } from "@/shared/panels/contribution-sidepanel/contributions-sidepanel.types";

import { Helper } from "./_features/helper/helper";
Expand Down Expand Up @@ -131,11 +132,15 @@ function useContributionBlocksAsContributor({ contribution }: UseContributionBlo

// Assigned issue
if (contribution.isInProgress()) {
const assignedBy = contribution.contributors.find(
contributor => contributor.githubUserId === githubUserId
)?.assignedBy;

return (
<>
<IssueOverview contribution={contribution} />
<RewardedCardWrapper contribution={contribution} recipientIds={recipientIds} />
{/*<UserCard title={{ translate: {token: "panels:contribution.userCard.assignedBy" }}} user={} />*/}
<UserCard title={{ translate: { token: "panels:contribution.userCard.assignedBy" } }} user={assignedBy} />
<Description description={contribution.githubBody} />
{/*// Timeline*/}
</>
Expand Down

0 comments on commit 2a51299

Please sign in to comment.