-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3121a87
commit b5a54a4
Showing
7 changed files
with
56 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
function ourOffices(block) { | ||
const addresses = block.addresses.map((item) => ({ | ||
...item, | ||
position: { | ||
lng: item?.location?.[0], | ||
lat: item?.location?.[1], | ||
}, | ||
center: { | ||
lng: item?.location?.[0], | ||
lat: item?.location?.[1], | ||
}, | ||
})); | ||
return { | ||
...block, | ||
slug: block.blockType, | ||
addresses, | ||
map: { | ||
apiKey: process.env.GOOGLE_API_KEY ?? null, | ||
zoom: 20, | ||
zoomControl: false, | ||
mapTypeControl: false, | ||
scaleControl: false, | ||
streetViewControl: false, | ||
rotateControl: false, | ||
fullscreenControl: false, | ||
}, | ||
}; | ||
} | ||
|
||
export default ourOffices; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const OurOffices = { | ||
slug: "our-offices", | ||
fields: [ | ||
{ | ||
name: "title", | ||
type: "text", | ||
required: true, | ||
}, | ||
{ | ||
type: "relationship", | ||
relationTo: "locations", | ||
hasMany: true, | ||
name: "addresses", | ||
required: true, | ||
}, | ||
], | ||
}; | ||
|
||
export default OurOffices; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters