Episodes: Podcast Highlights always defaults to the current series tab; v2.45.2
Publish Container / build (push) Successful in 16m24s
Publish Container / build (push) Successful in 16m24s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
597f996474
commit
e2cd66386b
2 files changed
+4
-2
No files matched your search
+3
-1
@@ -829,7 +829,8 @@ function PodcastHighlightsSection({ content }: { content: SiteContent }) {
|
||||
{ key: 'primary', title: content.seriesTitle, links: links.filter(link => laneOf(link) === 'primary') },
|
||||
{ key: 'second', title: content.secondSeries?.title?.trim() || 'Second Series', links: links.filter(link => laneOf(link) === 'second') },
|
||||
{ key: 'general', title: 'More Highlights', links: links.filter(link => laneOf(link) === 'general') },
|
||||
].filter(group => group.links.length > 0)
|
||||
].filter(group => group.key === 'primary' || group.links.length > 0)
|
||||
// Always open on the current series, even if it has no highlights yet
|
||||
const active = groups.find(group => group.key === activeKey) ?? groups[0]
|
||||
const isExpanded = expanded[active.key] === true
|
||||
const shown = isExpanded ? active.links : active.links.slice(0, HIGHLIGHTS_PREVIEW_COUNT)
|
||||
@@ -858,6 +859,7 @@ function PodcastHighlightsSection({ content }: { content: SiteContent }) {
|
||||
</div>
|
||||
)}
|
||||
<div className="episode-list">
|
||||
{shown.length === 0 && <p className="finished-books-empty">No highlights for this series yet.</p>}
|
||||
{shown.map(link => <HighlightCard key={link.id} link={link} />)}
|
||||
</div>
|
||||
{active.links.length > HIGHLIGHTS_PREVIEW_COUNT && (
|
||||
|
||||
Reference in new issue
Block a user