fix delay material fetching

This commit is contained in:
pakintada@gmail.com 2024-01-18 16:59:06 +07:00
parent db131d10c0
commit 4ece2cf30c
13 changed files with 220 additions and 143 deletions

View file

@ -0,0 +1,14 @@
export class AsyncStorage {
static async getItem<T>(key: string) {
return new Promise<T>((resolve) => {
resolve(localStorage.getItem(key) as T);
});
}
static async setItem(key: string, value: string) {
return new Promise<void>((resolve) => {
localStorage.setItem(key, value);
resolve();
});
}
}