mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-10-26 15:54:20 -04:00
15 lines
420 B
TypeScript
15 lines
420 B
TypeScript
import type { AppInfo } from "~/lib/api/types/admin";
|
|
|
|
export function useAppInfo(): Ref<AppInfo | null> {
|
|
const i18n = useI18n();
|
|
const { $axios } = useNuxtApp();
|
|
$axios.defaults.headers.common["Accept-Language"] = i18n.locale.value;
|
|
|
|
const { data: appInfo } = useAsyncData("app-info", async () => {
|
|
const data = await $axios.get<AppInfo>("/api/app/about");
|
|
return data.data;
|
|
});
|
|
|
|
return appInfo;
|
|
}
|