refactor: Small change to PullRequestCard subheader.

Signed-off-by: Marley Powell <Marley.Powell@exclaimer.com>
This commit is contained in:
Marley Powell
2021-11-26 13:22:02 +00:00
parent 0749dd0307
commit 2439a1acbd
@@ -67,14 +67,19 @@ export const PullRequestCard = ({
</Link>
);
const repoLink = (
<Link to={pullRequest.repository?.url ?? ''} color="inherit">
{pullRequest.repository?.name}
</Link>
);
const creationDate = pullRequest.creationDate
? DateTime.fromISO(pullRequest.creationDate).toRelative()
: undefined;
const subheader = (
<span>
<Link to={pullRequest.repository?.url ?? ''} color="inherit">
{pullRequest.repository?.name}
</Link>{' '}
·{' '}
{pullRequest.creationDate &&
DateTime.fromISO(pullRequest.creationDate).toRelative()}
{repoLink}·{creationDate}
</span>
);