refactor: OptionsSite => SiteOptions for clearer naming
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
const { data } = await useAsyncGraphQLQuery("GeneralSettings", undefined, { cache: { ttl: 0 } });
|
||||
const { data: generalSettings } = await useGeneralSettings();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
© {{ new Date().getFullYear() }}
|
||||
<span v-if="data.generalSettings?.title">{{ data.generalSettings.title }}</span>
|
||||
<span v-if="generalSettings?.title">{{ generalSettings.title }}</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
export const useGeneralSettings = () => useAsyncGraphQLQuery("GeneralSettings", {}, {
|
||||
transform: ({ generalSettings }) => generalSettings,
|
||||
});
|
||||
@@ -0,0 +1,3 @@
|
||||
export const useSiteOptions = () => useAsyncGraphQLQuery("SiteOptions", {}, {
|
||||
transform: ({ siteOptions }) => siteOptions?.groupSiteOptions,
|
||||
});
|
||||
@@ -1,11 +0,0 @@
|
||||
fragment SiteOptions on GroupSite_Fields {
|
||||
email
|
||||
}
|
||||
|
||||
query OptionsSite {
|
||||
optionsSite {
|
||||
groupSite {
|
||||
... SiteOptions
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fragment SiteOptions on GroupSiteOptions {
|
||||
email
|
||||
}
|
||||
|
||||
query SiteOptions {
|
||||
siteOptions {
|
||||
groupSiteOptions {
|
||||
... SiteOptions
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user