forked from Kieran/zap.stream
feat: add following title
This commit is contained in:
parent
22a799aac7
commit
7a0491f3b7
@ -42,17 +42,19 @@ export function useStreamsFeed(tag?: string) {
|
||||
return [];
|
||||
}, [feed.data]);
|
||||
|
||||
const live = feedSorted.filter(
|
||||
(a) => findTag(a, "status") === StreamState.Live
|
||||
).sort(sortStarts);
|
||||
const planned = feedSorted.filter(
|
||||
(a) => findTag(a, "status") === StreamState.Planned
|
||||
).sort(sortStarts);
|
||||
const ended = feedSorted.filter((a) => {
|
||||
const live = feedSorted
|
||||
.filter((a) => findTag(a, "status") === StreamState.Live)
|
||||
.sort(sortStarts);
|
||||
const planned = feedSorted
|
||||
.filter((a) => findTag(a, "status") === StreamState.Planned)
|
||||
.sort(sortStarts);
|
||||
const ended = feedSorted
|
||||
.filter((a) => {
|
||||
const hasEnded = findTag(a, "status") === StreamState.Ended;
|
||||
const recording = findTag(a, "recording") ?? "";
|
||||
return hasEnded && recording?.length > 0;
|
||||
}).sort(sortCreatedAt);
|
||||
})
|
||||
.sort(sortCreatedAt);
|
||||
|
||||
return { live, planned, ended };
|
||||
}
|
||||
|
@ -38,6 +38,12 @@
|
||||
display: flex;
|
||||
}
|
||||
|
||||
@media (max-width: 1020px) {
|
||||
.divider {
|
||||
padding: 0 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.divider:after {
|
||||
content: "";
|
||||
flex: 1;
|
||||
|
@ -32,11 +32,14 @@ export function RootPage() {
|
||||
return (
|
||||
<div className="homepage">
|
||||
{hasFollowingLive && (
|
||||
<>
|
||||
<h2 className="divider line one-line">Following</h2>
|
||||
<div className="video-grid">
|
||||
{following.map((e) => (
|
||||
<VideoTile ev={e} key={e.id} />
|
||||
))}
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
{!hasFollowingLive && (
|
||||
<div className="video-grid">
|
||||
|
Loading…
Reference in New Issue
Block a user