From a62881be6a51ce700f59d49eff8bf1b310f5c152 Mon Sep 17 00:00:00 2001 From: Alejandro Gomez Date: Fri, 6 Jan 2023 15:29:29 +0100 Subject: [PATCH] fix: force timeline rerender on tab change --- src/element/Timeline.js | 6 ++---- src/pages/Root.js | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/element/Timeline.js b/src/element/Timeline.js index 0052bcd..05be16d 100644 --- a/src/element/Timeline.js +++ b/src/element/Timeline.js @@ -5,10 +5,8 @@ import Note from "./Note"; /** * A list of notes by pubkeys */ -export default function Timeline(props) { - const pubkeys = props.pubkeys; - const global = props.global; - const feed = useTimelineFeed(pubkeys, global ?? false); +export default function Timeline({ global, pubkeys }) { + const feed = useTimelineFeed(pubkeys, global); function reaction(id, kind = EventKind.Reaction) { return feed?.others?.filter(a => a.kind === kind && a.tags.some(b => b[0] === "e" && b[1] === id)); diff --git a/src/pages/Root.js b/src/pages/Root.js index fb927e6..8361a80 100644 --- a/src/pages/Root.js +++ b/src/pages/Root.js @@ -35,7 +35,7 @@ export default function RootPage() { : null} {followHints()} - + ); } \ No newline at end of file