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

style: text color & position #1692

Merged
merged 8 commits into from
Jul 28, 2023
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
10 changes: 9 additions & 1 deletion apps/app/components/issues/comment/comment-reaction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,16 @@ export const CommentReaction: React.FC<Props> = (props) => {
: "bg-custom-background-80"
}`}
>
<span>{groupedReactions?.[reaction].length} </span>
<span>{renderEmoji(reaction)}</span>
<span
className={
commentReactions?.some((r) => r.actor === user?.id && r.reaction === reaction)
? "text-custom-primary-100"
: ""
}
>
{groupedReactions?.[reaction].length}{" "}
</span>
</button>
)
)}
Expand Down
10 changes: 9 additions & 1 deletion apps/app/components/issues/issue-reaction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,16 @@ export const IssueReaction: React.FC<Props> = (props) => {
: "bg-custom-background-80"
}`}
>
<span>{groupedReactions?.[reaction].length} </span>
<span>{renderEmoji(reaction)}</span>
<span
className={
reactions?.some((r) => r.actor === user?.id && r.reaction === reaction)
? "text-custom-primary-100"
: ""
}
>
{groupedReactions?.[reaction].length}{" "}
</span>
</button>
)
)}
Expand Down
6 changes: 4 additions & 2 deletions apps/app/hooks/use-comment-reaction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ const useCommentReaction = (
workspaceSlug.toString(),
projectId.toString(),
commendId.toString(),
{ reaction }
{ reaction },
user.user
);

mutateCommentReactions((prev) => [...(prev || []), data]);
Expand All @@ -76,7 +77,8 @@ const useCommentReaction = (
workspaceSlug.toString(),
projectId.toString(),
commendId.toString(),
reaction
reaction,
user.user
);

mutateCommentReactions();
Expand Down
6 changes: 4 additions & 2 deletions apps/app/hooks/use-issue-reaction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ const useIssueReaction = (
workspaceSlug.toString(),
projectId.toString(),
issueId.toString(),
{ reaction }
{ reaction },
user.user
);

mutateReaction((prev) => [...(prev || []), data]);
Expand All @@ -77,7 +78,8 @@ const useIssueReaction = (
workspaceSlug.toString(),
projectId.toString(),
issueId.toString(),
reaction
reaction,
user.user
);

mutateReaction();
Expand Down