Revert "Rewrite cosmetics and theme preferences (#1292)"

This reverts commit 8704d3acb3.
This commit is contained in:
Jai A
2024-07-25 17:38:37 -07:00
parent ca913cafbc
commit 57ba84107c
21 changed files with 249 additions and 269 deletions

View File

@@ -1,14 +0,0 @@
/**
* Creates a computed reference that uses a provide getter function called with an argument representing the current mount state of the component.
* @param getter A getter function that will run with `mounted` argument representing whether or not the component is mounted.
* @returns A computed reference that changes when component becomes mounted or unmounted.
*/
export function useMountedValue<T>(getter: (isMounted: boolean) => T) {
const mounted = ref(getCurrentInstance()?.isMounted ?? false);
onMounted(() => (mounted.value = true));
onUnmounted(() => (mounted.value = false));
return computed(() => getter(mounted.value));
}