Skip to content

Commit

Permalink
add tags to task card
Browse files Browse the repository at this point in the history
  • Loading branch information
vhcsilva committed Nov 6, 2024
1 parent bbeb5f8 commit dc8cb2c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
6 changes: 4 additions & 2 deletions components/bounty/bounty-tags/view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@ import Badge from "components/badge";

interface BountyTagsProps {
tags: string[];
className?: string
}

export default function BountyTagsView({
tags
tags,
className = ""
}: BountyTagsProps) {
if (!tags) return <></>;

return (
<div className="d-flex flex-wrap gap-1">
<div className={`d-flex flex-wrap gap-1 ${className}`}>
{tags.map((tag) => (
<Badge
key={tag}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { SubscriptionTaskButton }
import { ResponsiveEle } from "components/responsive-wrapper";

import { TaskListItemVariantProps } from "types/components";
import BountyTagsView from "components/bounty/bounty-tags/view";

export default function TaskListItemDefault({
task,
Expand Down Expand Up @@ -80,6 +81,12 @@ export default function TaskListItemDefault({
/>
</div>

<If condition={!!task?.tags?.length && !isMarketplaceList}>
<div className="col-auto px-0 d-none d-lg-block">
<BountyTagsView tags={task?.tags} className="gap-3" />
</div>
</If>

<div className="col-auto px-0 d-block d-sm-none">
<WinnersBadge
isMultiple={task?.multipleWinners}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default function TasksListItem({

return <TaskListItemDefault
task={issue}
isMarketplaceList={variant === "network"}
isMarketplaceList={variant !== "network"}
onClick={handleClickCard}
/>;
}

0 comments on commit dc8cb2c

Please sign in to comment.