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:
parent
419231bddb
commit
e185e03c6c
1 changed files with 3 additions and 0 deletions
|
|
@ -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));
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue