digitalfabrik/integreat-app

View on GitHub
native/src/utils/cityShareName.ts

Summary

Maintainability
A
0 mins
Test Coverage
B
80%
import { CityModel } from 'shared/api'

const cityShareName = (city: CityModel | undefined): string => {
  if (!city) {
    return ''
  }
  return city.prefix ? `${city.prefix} ${city.sortingName}` : city.sortingName
}

export default cityShareName