mirror of
				https://github.com/mealie-recipes/mealie.git
				synced 2025-11-04 03:03:18 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
		
			377 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			377 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
import { onMounted, ref, Ref } from "@nuxtjs/composition-api";
 | 
						|
import { AppInfo } from "~/types/api-types/admin";
 | 
						|
 | 
						|
export function useAppInfo(): Ref<AppInfo | null> {
 | 
						|
  const appInfo = ref<null | AppInfo>(null);
 | 
						|
 | 
						|
  onMounted(async () => {
 | 
						|
    const data = await fetch("/api/app/about").then((res) => res.json());
 | 
						|
    appInfo.value = data as AppInfo;
 | 
						|
  });
 | 
						|
 | 
						|
  return appInfo;
 | 
						|
}
 |