import { SiteConfig } from '@/payload-types' export async function fetchSiteConfig(): Promise { const res = await fetch( 'http://localhost:3000/api/globals/site-config', { next: { tags: ['site-config'] }, }, ) if (!res.ok) { throw new Error('Could not fetch site-config') } return res.json() }