-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add click to edit to offices template (#932)
- Loading branch information
1 parent
4494a43
commit 3c959e6
Showing
2 changed files
with
108 additions
and
81 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,75 @@ | ||
import Image from "next/image"; | ||
import Link from "next/link"; | ||
|
||
const ContactPanel = ({ | ||
phone, | ||
streetAddress, | ||
suburb, | ||
addressLocality, | ||
addressRegion, | ||
postalCode, | ||
addressCountry, | ||
sideImg, | ||
sidebarSecondaryPlace, | ||
}) => ( | ||
<> | ||
<h3>Contact Us</h3> | ||
<p> | ||
Whether you're having trouble with your development process or you just | ||
need us to write some awesome software, our team of experts is ready to | ||
help. | ||
</p> | ||
import { tinaField } from "tinacms/dist/react"; | ||
|
||
<p> | ||
Give us a call on | ||
<br /> | ||
<strong>{phone}</strong> | ||
</p> | ||
const ContactPanel = ({ office }) => { | ||
return ( | ||
<> | ||
<h3>Contact Us</h3> | ||
<p> | ||
Whether you're having trouble with your development process or you just | ||
need us to write some awesome software, our team of experts is ready to | ||
help. | ||
</p> | ||
|
||
<p> | ||
Find us at | ||
<br /> | ||
<strong> | ||
{streetAddress} <br /> | ||
{suburb}, {addressRegion} {postalCode} <br /> | ||
{addressCountry} | ||
</strong> | ||
</p> | ||
<p> | ||
Give us a call on | ||
<br /> | ||
<span data-tina-field={tinaField(office, "phone")}> | ||
<strong>{office.phone}</strong> | ||
</span> | ||
</p> | ||
<p> | ||
Find us at | ||
<br /> | ||
<strong> | ||
<span data-tina-field={tinaField(office, "streetAddress")}> | ||
{office.streetAddress} | ||
</span> | ||
<br /> | ||
<span data-tina-field={tinaField(office, "suburb")}> | ||
{office.suburb + ", "} | ||
</span> | ||
<span data-tina-field={tinaField(office, "addressRegion")}> | ||
{office.addressRegion + " "} | ||
</span> | ||
<span data-tina-field={tinaField(office, "postalCode")}> | ||
{office.postalCode} | ||
</span> | ||
<br /> | ||
<span data-tina-field={tinaField(office, "addressCountry")}> | ||
{office.addressCountry} | ||
</span> | ||
</strong> | ||
</p> | ||
<p> | ||
{"Learn more on "} | ||
<Link href={`https://sswchapel.com.au/${office.addressLocality}`}> | ||
SSW Chapel | ||
</Link> | ||
{!!office.sidebarSecondaryPlace && ( | ||
<> | ||
{" and "} | ||
<Link href={office.sidebarSecondaryPlace.url}> | ||
{office.sidebarSecondaryPlace.name} | ||
</Link> | ||
</> | ||
)} | ||
</p> | ||
|
||
<p> | ||
{"Learn more on "} | ||
<Link href={`https://sswchapel.com.au/${addressLocality}`}> | ||
SSW Chapel | ||
</Link> | ||
{!!sidebarSecondaryPlace && ( | ||
<> | ||
{" and "} | ||
<Link href={sidebarSecondaryPlace.url}> | ||
{sidebarSecondaryPlace.name} | ||
</Link> | ||
</> | ||
{office.sideImg && ( | ||
<div data-tina-field={tinaField(office, "sideImg")}> | ||
<Image | ||
src={office.sideImg} | ||
width={285} | ||
height={160} | ||
alt="Sidebar Image" | ||
/> | ||
</div> | ||
)} | ||
</p> | ||
|
||
{sideImg && ( | ||
<Image src={sideImg} width={285} height={160} alt="Sidebar Image" /> | ||
)} | ||
</> | ||
); | ||
</> | ||
); | ||
}; | ||
|
||
export default ContactPanel; |
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