import { Church } from '@/payload-types' export const useLocation = (location: string | Church): Church => { if (typeof location === 'string') { return { address: '', createdAt: '', name: 'Unknown', updatedAt: '', id: location, } } else { return location } }