forked from Kieran/snort
bug: thread sub loop
This commit is contained in:
parent
d66f9ab18d
commit
bd2417cda0
@ -13,8 +13,13 @@ export default function useThreadFeed(id: u256) {
|
||||
|
||||
function addId(id: u256[]) {
|
||||
setTrackingEvent((s) => {
|
||||
let tmp = new Set([...s, ...id]);
|
||||
return Array.from(tmp);
|
||||
let orig = new Set(s);
|
||||
if (!id.some(a => orig.has(a))) {
|
||||
let tmp = new Set([...s, ...id]);
|
||||
return Array.from(tmp);
|
||||
} else {
|
||||
return s;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@ -45,5 +50,5 @@ export default function useThreadFeed(id: u256) {
|
||||
return () => clearTimeout(t);
|
||||
}, [main.store]);
|
||||
|
||||
return main;
|
||||
return main.store;
|
||||
}
|
@ -8,5 +8,5 @@ export default function EventPage() {
|
||||
const id = parseId(params.id!);
|
||||
const thread = useThreadFeed(id);
|
||||
|
||||
return <Thread notes={thread.store.notes} this={id} />;
|
||||
return <Thread notes={thread.notes} this={id} />;
|
||||
}
|
Loading…
Reference in New Issue
Block a user