12 lines
No EOL
247 B
TypeScript
12 lines
No EOL
247 B
TypeScript
import { Church } from '@/payload-types'
|
|
|
|
/**
|
|
* Get user friendly location name
|
|
*/
|
|
export const useLocationName = (location: string | Church) => {
|
|
if (typeof location == "string") {
|
|
return location
|
|
} else {
|
|
return location.name
|
|
}
|
|
} |