Fixex announcement web not close after acknowledgement

This commit is contained in:
Alex Tran committed 2022-06-11 19:58:16 -05:00
1 parent 53cd9fd8bf
commit 587b77e70b
2 files changed
+5 -2

No files matched your search

@@ -7,10 +7,12 @@
export let localVersion: string;
export let remoteVersion: string;
const dispatch = createEventDispatcher();
const acknowledgeClickHandler = () => {
localStorage.setItem('appVersion', remoteVersion);
goto($page.url.pathname);
dispatch('close');
};
</script>
+2 -1
View File
@@ -7,6 +7,7 @@
if (browser) {
const { shouldShowAnnouncement, localVersion, remoteVersion } = await checkAppVersion();
console.log('Recheck');
return { props: { url, shouldShowAnnouncement, localVersion, remoteVersion } };
} else {
return {
@@ -38,7 +39,7 @@
<DownloadPanel />
{#if shouldShowAnnouncement}
<AnnouncementBox {localVersion} {remoteVersion} />
<AnnouncementBox {localVersion} {remoteVersion} on:close={() => (shouldShowAnnouncement = false)} />
{/if}
</div>
{/key}