20 lines
484 B
JavaScript
20 lines
484 B
JavaScript
|
// Utilities
|
||
|
import { computed, onMounted, readonly, shallowRef } from 'vue';
|
||
|
|
||
|
// Composables
|
||
|
export function useSsrBoot() {
|
||
|
const isBooted = shallowRef(false);
|
||
|
onMounted(() => {
|
||
|
window.requestAnimationFrame(() => {
|
||
|
isBooted.value = true;
|
||
|
});
|
||
|
});
|
||
|
const ssrBootStyles = computed(() => !isBooted.value ? {
|
||
|
transition: 'none !important'
|
||
|
} : undefined);
|
||
|
return {
|
||
|
ssrBootStyles,
|
||
|
isBooted: readonly(isBooted)
|
||
|
};
|
||
|
}
|
||
|
//# sourceMappingURL=ssrBoot.mjs.map
|