fix(channel): show the Exploring badge on first visit

Refetch the channel detail after the auto-explore ingest so `explored` flips true and the
"Exploring" badge appears immediately — the GET that drove the first render predated the
explore that just created the ExploredChannel row.
This commit is contained in:
npeter83 2026-06-30 04:17:49 +02:00
parent 419231bddb
commit e185e03c6c

View file

@ -53,6 +53,9 @@ export default function ChannelPage({
.then((r) => { .then((r) => {
setNextToken(r.next_page_token); setNextToken(r.next_page_token);
qc.invalidateQueries({ queryKey: ["feed"] }); qc.invalidateQueries({ queryKey: ["feed"] });
// Refetch the detail so `explored` flips true → the "Exploring" badge shows on the
// first visit (the GET that drove this render predated the explore that just ran).
qc.invalidateQueries({ queryKey: ["channel", channelId] });
}) })
.finally(() => setExploring(false)); .finally(() => setExploring(false));
}, },