Temporarily disable this now

pull/39/head
Lim Chee Aun 2022-12-29 10:27:36 +08:00
rodzic a6196f923f
commit 353c911232
1 zmienionych plików z 10 dodań i 9 usunięć

Wyświetl plik

@ -81,15 +81,16 @@ function StatusPage({ id }) {
let heroStatus = snapStates.statuses.get(id);
if (hasStatus) {
console.log('Hero status is cached');
heroTimer = setTimeout(async () => {
try {
heroStatus = await heroFetch();
states.statuses.set(id, heroStatus);
} catch (e) {
// Silent fail if status is cached
console.error(e);
}
}, 1000);
// NOTE: This might conflict if the user interacts with the status before the fetch is done, e.g. favouriting it
// heroTimer = setTimeout(async () => {
// try {
// heroStatus = await heroFetch();
// states.statuses.set(id, heroStatus);
// } catch (e) {
// // Silent fail if status is cached
// console.error(e);
// }
// }, 1000);
} else {
try {
heroStatus = await heroFetch();