feat(don): add goal widget

This commit is contained in:
2026-06-15 12:14:38 +07:00 Unverified
parent ca8fe8e741
commit 25d8a6c2b4
8 changed files with 231 additions and 2 deletions
+8 -2
View File
@@ -16,11 +16,17 @@ export default function TopDonateWidget() {
void getTopDonate().then(setTop);
}
queueMicrotask(update);
return sse.donate.subMany({
const { clean } = sse.donate.subMany({
update,
ping: update,
refresh: () => location.reload(),
}).clean;
});
setInterval(update, 300000);
return () => {
clean();
};
}, []);
// the most idiomatic way possible but it works