Skip to content

Commit

Permalink
🐛 show hide show button if it's not watched
Browse files Browse the repository at this point in the history
  • Loading branch information
pouyio committed Feb 8, 2025
1 parent 138a2d4 commit ff321b8
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/pages/ShowDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,15 @@ export default function ShowDetail() {
<h2 className="mx-1 rounded-full text-sm px-3 py-2 bg-gray-100 capitalize">
{t(item.status)}
</h2>
<button onClick={onToggleHidden}>
<Icon
className="h-10"
name={isHidden(item.ids.trakt) ? 'no-hidden' : 'hidden'}
title="Toggle visibility"
/>
</button>
{isWatched(+id!, 'show') && (
<button onClick={onToggleHidden}>
<Icon
className="h-10"
name={isHidden(item.ids.trakt) ? 'no-hidden' : 'hidden'}
title="Toggle visibility"
/>
</button>
)}
<h2>{item.runtime || '?'} mins</h2>
</div>
<div className="flex mb-4 justify-between items-center text-gray-600">
Expand Down

0 comments on commit ff321b8

Please sign in to comment.