feat: useSiteOptions / useGeneralSettings
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
fragment GeneralSettings on GeneralSettings {
|
||||
title
|
||||
description
|
||||
}
|
||||
|
||||
query GeneralSettings {
|
||||
generalSettings {
|
||||
...GeneralSettings
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
export const useGeneralSettings = () =>
|
||||
useAsyncGraphQLQuery(
|
||||
"GeneralSettings",
|
||||
{},
|
||||
{
|
||||
transform: (data) => data.generalSettings,
|
||||
},
|
||||
);
|
||||
@@ -0,0 +1,14 @@
|
||||
fragment SiteOptions on GroupSiteOptions {
|
||||
email
|
||||
social @nonNull {
|
||||
...AcfSocial
|
||||
}
|
||||
}
|
||||
|
||||
query SiteOptions {
|
||||
siteOptionsPage @nonNull {
|
||||
groupSiteOptions @nonNull {
|
||||
...SiteOptions
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
export const useSiteOptions = () =>
|
||||
useAsyncGraphQLQuery(
|
||||
"SiteOptions",
|
||||
{},
|
||||
{
|
||||
transform: (data) => data.siteOptionsPage?.groupSiteOptions,
|
||||
},
|
||||
);
|
||||
Reference in New Issue
Block a user