Fix stream ordering
This commit is contained in:
@ -3,8 +3,9 @@ import './index.css';
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ReactDOM from 'react-dom/client';
|
import ReactDOM from 'react-dom/client';
|
||||||
import { NostrSystem } from "@snort/system";
|
import { NostrSystem } from "@snort/system";
|
||||||
import { RootPage } from './pages/root';
|
|
||||||
import { RouterProvider, createBrowserRouter } from 'react-router-dom';
|
import { RouterProvider, createBrowserRouter } from 'react-router-dom';
|
||||||
|
|
||||||
|
import { RootPage } from './pages/root';
|
||||||
import { LayoutPage } from 'pages/layout';
|
import { LayoutPage } from 'pages/layout';
|
||||||
import { StreamPage } from 'pages/stream-page';
|
import { StreamPage } from 'pages/stream-page';
|
||||||
import { ChatPopout } from 'pages/chat-popout';
|
import { ChatPopout } from 'pages/chat-popout';
|
||||||
|
@ -19,7 +19,7 @@ export function RootPage() {
|
|||||||
const aStatus = findTag(a, "status")!;
|
const aStatus = findTag(a, "status")!;
|
||||||
const bStatus = findTag(b, "status")!;
|
const bStatus = findTag(b, "status")!;
|
||||||
if (aStatus === bStatus) {
|
if (aStatus === bStatus) {
|
||||||
return b.created_at - a.created_at;
|
return b.created_at > a.created_at ? 1 : -1;
|
||||||
} else {
|
} else {
|
||||||
return aStatus === "live" ? -1 : 1;
|
return aStatus === "live" ? -1 : 1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user