diff --git a/components/offices/contactPanel.tsx b/components/offices/contactPanel.tsx index 66205ef303..78acc8ad99 100644 --- a/components/offices/contactPanel.tsx +++ b/components/offices/contactPanel.tsx @@ -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, -}) => ( - <> -

Contact Us

-

- 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. -

+import { tinaField } from "tinacms/dist/react"; -

- Give us a call on -
- {phone} -

+const ContactPanel = ({ office }) => { + return ( + <> +

Contact Us

+

+ 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. +

-

- Find us at -
- - {streetAddress}
- {suburb}, {addressRegion} {postalCode}
- {addressCountry} -
-

+

+ Give us a call on +
+ + {office.phone} + +

+

+ Find us at +
+ + + {office.streetAddress} + +
+ + {office.suburb + ", "} + + + {office.addressRegion + " "} + + + {office.postalCode} + +
+ + {office.addressCountry} + +
+

+

+ {"Learn more on "} + + SSW Chapel + + {!!office.sidebarSecondaryPlace && ( + <> + {" and "} + + {office.sidebarSecondaryPlace.name} + + + )} +

-

- {"Learn more on "} - - SSW Chapel - - {!!sidebarSecondaryPlace && ( - <> - {" and "} - - {sidebarSecondaryPlace.name} - - + {office.sideImg && ( +

+ Sidebar Image +
)} -

- - {sideImg && ( - Sidebar Image - )} - -); + + ); +}; export default ContactPanel; diff --git a/pages/offices/[filename].tsx b/pages/offices/[filename].tsx index 33da7cc018..a8e565dee8 100644 --- a/pages/offices/[filename].tsx +++ b/pages/offices/[filename].tsx @@ -1,6 +1,6 @@ import Image from "next/image"; -import { useTina } from "tinacms/dist/react"; +import { tinaField, useTina } from "tinacms/dist/react"; import { TinaMarkdown } from "tinacms/dist/rich-text"; import { client } from "../../.tina/__generated__/client"; @@ -34,6 +34,7 @@ export default function OfficePage(
{ return (

About Us

- +
+ +
{office.map ? ( <>

SSW {office.addressLocality} Map

{ )}

SSW {office.addressLocality} Directions

- + Map pin icon { {`${office.streetAddress}, ${office.suburb}, ${office.addressRegion} ${office.postalCode}, ${office.addressCountry}`}

- +
+ +
{office.parking.children.length > 0 && ( <>

Parking

- +
+ +
)} {office.publicTransport.children.length > 0 && ( <>

Public Transport

- +
+ +
)} {office.team.children.length > 0 ? ( <> -

The SSW {office.addressLocality} Team

- +
+

The SSW {office.addressLocality} Team

+ +
) : ( <> @@ -145,7 +163,12 @@ const OfficeLayout = ({ office }) => { {office._body.children.length > 0 && ( <>
- +
+ +
)}
@@ -155,18 +178,7 @@ const OfficeLayout = ({ office }) => { const SidePanel = ({ office, testimonial }) => { return (
- - +