diff --git a/apps/desktop2/src/routes/landing/index.tsx b/apps/desktop2/src/routes/landing/index.tsx index 9a5cf15d..c5689746 100644 --- a/apps/desktop2/src/routes/landing/index.tsx +++ b/apps/desktop2/src/routes/landing/index.tsx @@ -21,10 +21,10 @@ function Screen() {
lume

{t("welcome.title")} @@ -62,7 +62,7 @@ function Screen() {

-
+
{ + const res = await fetch("https://api.nostr.band/v0/trending/notes"); + const data = await res.json(); + const events = data.notes.map((item) => item.event) as Event[]; + return events.sort((a, b) => b.created_at - a.created_at); + }, + refetchOnWindowFocus: false, + }); const renderItem = (event: Event) => { if (!event) return; @@ -40,9 +43,11 @@ export function Screen() { - {isLoading || isRefetching ? ( + {isLoading ? (
- +
) : !data.length ? (
@@ -60,25 +65,6 @@ export function Screen() { {data.map((item) => renderItem(item))} )} -
- {hasNextPage ? ( - - ) : null} -
); diff --git a/packages/ui/src/note/preview/video.tsx b/packages/ui/src/note/preview/video.tsx index 1e858034..49a9cf1c 100644 --- a/packages/ui/src/note/preview/video.tsx +++ b/packages/ui/src/note/preview/video.tsx @@ -1,30 +1,14 @@ -import { - MediaControlBar, - MediaController, - MediaMuteButton, - MediaPlayButton, - MediaTimeDisplay, - MediaTimeRange, -} from "media-chrome/dist/react"; - export function VideoPreview({ url }: { url: string }) { return ( -
- - +
+
); }