Fix loading overlay expire bug
This commit is contained in:
@@ -5,18 +5,9 @@ const { $gsap: gsap } = useNuxtApp();
|
||||
|
||||
const isSiteLoadingDisabled = useCookie("is-site-loading-disabled", {
|
||||
default: () => false,
|
||||
expires: new Date(Date.now() + 0.5 * 60 * 1000),
|
||||
});
|
||||
|
||||
watch(
|
||||
isSiteLoadingDisabled,
|
||||
(nv) => {
|
||||
console.log(nv);
|
||||
},
|
||||
{
|
||||
immediate: true,
|
||||
}
|
||||
);
|
||||
|
||||
const shouldRenderLoadingOverlay = ref(true);
|
||||
const isAssetLoaded = ref(false);
|
||||
const criticalLoad = ref(true);
|
||||
@@ -81,6 +72,8 @@ onMounted(() => {
|
||||
gsap.to("#loading-overlay", {
|
||||
opacity: 1,
|
||||
});
|
||||
} else {
|
||||
shouldRenderLoadingOverlay.value = false;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user