19 lines
435 B
TypeScript
19 lines
435 B
TypeScript
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;
|
|
}
|