Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add tags to task card #514

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}
/>;
}
Loading