Fix farmable today on home

This commit is contained in:
Made Baruna 2021-09-19 13:55:42 +07:00
parent 39bb15d45e
commit 28bec625a2
No known key found for this signature in database
GPG key ID: 5AA5DA16AA5DCEAD

View file

@ -7,11 +7,11 @@
import Icon from '../../components/Icon.svelte';
import { characters } from '../../data/characters';
import { weaponList } from '../../data/weaponList';
import { getCurrentDay } from '../../stores/server';
import { getCurrentDay, server } from '../../stores/server';
const dispatch = createEventDispatcher();
const today = getCurrentDay();
let today = getCurrentDay();
let characterItems = {};
let weaponItems = {};
@ -46,9 +46,20 @@
}
onMount(async () => {
const ubsub = server.subscribe(async () => {
today = getCurrentDay();
parseTalentBook();
await tick();
dispatch('done');
});
parseTalentBook();
await tick();
dispatch('done');
return () => {
ubsub();
};
});
</script>