Skip to content

Commit

Permalink
chore(app): add release year to directing credits
Browse files Browse the repository at this point in the history
  • Loading branch information
mgramigna committed Dec 31, 2023
1 parent c720537 commit 53f59cd
Showing 1 changed file with 22 additions and 12 deletions.
34 changes: 22 additions & 12 deletions apps/nextjs/src/app/play/[gameId]/(pages)/p/[personId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,18 +98,28 @@ export default function PersonDetailPage() {
Directing
</h3>
{directing.length > 0 ? (
directing.map(({ id, title }) => (
<div key={id}>
{title && (
<ClickableDetail
href={`/play/${gameId}/m/${id}`}
label={title}
type="movie"
id={id}
/>
)}
</div>
))
directing.map(({ id, title, release_date }) => {
const releaseDate = release_date
? dayjs(release_date)
: undefined;

return (
<div key={id}>
{title && (
<ClickableDetail
href={`/play/${gameId}/m/${id}`}
label={`${title}${
releaseDate?.isValid()
? ` (${releaseDate.format("YYYY")})`
: ""
}`}
type="movie"
id={id}
/>
)}
</div>
);
})
) : !creditsLoading ? (
<div className="w-72 text-sm italic">None</div>
) : null}
Expand Down

0 comments on commit 53f59cd

Please sign in to comment.