feat: useSiteOptions / useGeneralSettings

This commit is contained in:
2026-03-26 11:05:45 -04:00
parent ce8b1a3a5c
commit 87d2374b66
4 changed files with 40 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
fragment GeneralSettings on GeneralSettings {
title
description
}
query GeneralSettings {
generalSettings {
...GeneralSettings
}
}

View File

@@ -0,0 +1,8 @@
export const useGeneralSettings = () =>
useAsyncGraphQLQuery(
"GeneralSettings",
{},
{
transform: (data) => data.generalSettings,
},
);

View File

@@ -0,0 +1,14 @@
fragment SiteOptions on GroupSiteOptions {
email
social @nonNull {
...AcfSocial
}
}
query SiteOptions {
siteOptionsPage @nonNull {
groupSiteOptions @nonNull {
...SiteOptions
}
}
}

View File

@@ -0,0 +1,8 @@
export const useSiteOptions = () =>
useAsyncGraphQLQuery(
"SiteOptions",
{},
{
transform: (data) => data.siteOptionsPage?.groupSiteOptions,
},
);