fix: force timeline rerender on tab change #8
@ -5,10 +5,8 @@ import Note from "./Note";
|
|||||||
/**
|
/**
|
||||||
* A list of notes by pubkeys
|
* A list of notes by pubkeys
|
||||||
*/
|
*/
|
||||||
export default function Timeline(props) {
|
export default function Timeline({ global, pubkeys }) {
|
||||||
const pubkeys = props.pubkeys;
|
const feed = useTimelineFeed(pubkeys, global);
|
||||||
const global = props.global;
|
|
||||||
const feed = useTimelineFeed(pubkeys, global ?? false);
|
|
||||||
|
|
||||||
function reaction(id, kind = EventKind.Reaction) {
|
function reaction(id, kind = EventKind.Reaction) {
|
||||||
return feed?.others?.filter(a => a.kind === kind && a.tags.some(b => b[0] === "e" && b[1] === id));
|
return feed?.others?.filter(a => a.kind === kind && a.tags.some(b => b[0] === "e" && b[1] === id));
|
||||||
|
@ -35,7 +35,7 @@ export default function RootPage() {
|
|||||||
</div>
|
</div>
|
||||||
</div></> : null}
|
</div></> : null}
|
||||||
{followHints()}
|
{followHints()}
|
||||||
<Timeline pubkeys={follows} global={loggedOut === true || tab === RootTab.Global} />
|
<Timeline key={tab} pubkeys={follows} global={loggedOut || tab === RootTab.Global} />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user