turned template into create cli
This commit is contained in:
18
template/apps/client/src/sanity/settings.ts
Normal file
18
template/apps/client/src/sanity/settings.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { sanityFetch } from "./live";
|
||||
|
||||
export async function fetchSettings(prop?: string | undefined) {
|
||||
const settingsFetch = await sanityFetch({
|
||||
query: `*[_type == "settings"][0]{
|
||||
${
|
||||
prop ||
|
||||
`title,
|
||||
longTitle,
|
||||
footer,
|
||||
description,
|
||||
logo,
|
||||
favicon`
|
||||
}
|
||||
}`,
|
||||
});
|
||||
return settingsFetch.data;
|
||||
}
|
||||
Reference in New Issue
Block a user