Merged in feat/SW-1450-destination-page-cs-components (pull request #1204)
feat(SW-1450): added components in destination pages from cs * feat(SW-1450): added components in destination pages from cs * feat(SW-1450): added correct refs and removed classNames Approved-by: Fredrik Thorsson
This commit is contained in:
@@ -14,14 +14,16 @@ function getCenter({
|
||||
city?: string
|
||||
country?: string
|
||||
}): string | undefined {
|
||||
switch (true) {
|
||||
case !!coordinates:
|
||||
return `${coordinates.lat},${coordinates.lng}`
|
||||
case !!country:
|
||||
return `${city}, ${country}`
|
||||
default:
|
||||
return city
|
||||
if (coordinates) {
|
||||
return `${coordinates.lat},${coordinates.lng}`
|
||||
}
|
||||
if (city && country) {
|
||||
return `${city}, ${country}`
|
||||
}
|
||||
if (country) {
|
||||
return country
|
||||
}
|
||||
return city
|
||||
}
|
||||
|
||||
export default function StaticMap({
|
||||
|
||||
Reference in New Issue
Block a user