Temporarily disable this now

This commit is contained in:
Lim Chee Aun 2022-12-29 10:27:36 +08:00
parent a6196f923f
commit 353c911232

View file

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