Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

PullRequestMoreReplies.tsx

28 lines759 Bytes

1import type { PullRequestReplyAvailability } from "./pullRequestDetail.logic";
2​
3export function PullRequestMoreReplies({
4 moreReplies,
5 hasMoreReplies,
6 url,
7}: PullRequestReplyAvailability) {
8 if (!hasMoreReplies) return null;
9 return (
10 <div className="flex flex-wrap items-baseline gap-2 py-1 text-xs text-muted-foreground">
11 <span>
12 {moreReplies > 0
13 ? `${moreReplies.toLocaleString()} more ${moreReplies === 1 ? "reply" : "replies"}`
14 : "More replies"}
15 </span>
16 {url ? (
17 <a
18 href={url}
19 target="_blank"
20 rel="noopener noreferrer"
21 className="hover:text-foreground hover:underline"
22 >
23 View on host
24 </a>
25 ) : null}
26 </div>
27 );