Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: playlist empty state bug #23117

Merged
merged 3 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions frontend/src/lib/components/Playlist/Playlist.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,13 @@ export function ListSection<
}): JSX.Element {
return (
<>
{items.length &&
items.map((item) => (
<div key={item.id} className="border-b" onClick={() => onClick(item)}>
{render({ item, isActive: item.id === activeItemId })}
</div>
))}
{items.length > 0
? items.map((item) => (
<div key={item.id} className="border-b" onClick={() => onClick(item)}>
{render({ item, isActive: item.id === activeItemId })}
</div>
))
: null}
{footer}
</>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,16 +125,18 @@ export function SessionRecordingsPlaylist(props: SessionRecordingPlaylistLogicPr
/>
),
footer: (
<div className="m-4 h-10 flex items-center justify-center gap-2 text-muted-alt">
{sessionRecordingsResponseLoading ? (
<>
<Spinner textColored /> Loading older recordings
</>
) : hasNext ? (
<LemonButton onClick={() => maybeLoadSessionRecordings('older')}>Load more</LemonButton>
) : (
'No more results'
)}
<div className="p-4">
<div className="h-10 flex items-center justify-center gap-2 text-muted-alt">
{sessionRecordingsResponseLoading ? (
<>
<Spinner textColored /> Loading older recordings
</>
) : hasNext ? (
<LemonButton onClick={() => maybeLoadSessionRecordings('older')}>Load more</LemonButton>
) : (
'No more results'
)}
</div>
</div>
),
})
Expand Down
Loading