feat: update phone number and email
This commit is contained in:
@@ -22,7 +22,7 @@ const Content = styled.div`
|
|||||||
const Cell = styled.div`
|
const Cell = styled.div`
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
${props =>
|
${(props) =>
|
||||||
props.flexEnd &&
|
props.flexEnd &&
|
||||||
css`
|
css`
|
||||||
@media (min-width: ${props.flexEnd}) {
|
@media (min-width: ${props.flexEnd}) {
|
||||||
@@ -41,17 +41,15 @@ export default function Footer() {
|
|||||||
<StaticQuery
|
<StaticQuery
|
||||||
query={graphql`
|
query={graphql`
|
||||||
query {
|
query {
|
||||||
allPerson(filter: { name: { eq: "Nicholas Day" } }) {
|
allPerson(filter: { name: { eq: "Daniel Costea" } }) {
|
||||||
nodes {
|
nodes {
|
||||||
phone
|
phone
|
||||||
altPhone
|
|
||||||
email
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`}
|
`}
|
||||||
render={data => {
|
render={(data) => {
|
||||||
const { phone, altPhone, email } = data.allPerson.nodes[0];
|
const { phone } = data.allPerson.nodes[0];
|
||||||
return (
|
return (
|
||||||
<Container>
|
<Container>
|
||||||
<Content>
|
<Content>
|
||||||
@@ -77,46 +75,24 @@ export default function Footer() {
|
|||||||
</IconWithContent>
|
</IconWithContent>
|
||||||
</Item>
|
</Item>
|
||||||
)}
|
)}
|
||||||
{altPhone && (
|
|
||||||
<Item>
|
|
||||||
<IconWithContent>
|
|
||||||
<Icon color="dark" size="lg">
|
|
||||||
<Phone />
|
|
||||||
</Icon>
|
|
||||||
<Link
|
|
||||||
weight="bold"
|
|
||||||
color="dark"
|
|
||||||
size="lg"
|
|
||||||
to={`tel:${altPhone
|
|
||||||
.replace(/ /, "")
|
|
||||||
.replace(/^0/, "+44")}`}
|
|
||||||
noDecoration
|
|
||||||
>
|
|
||||||
{altPhone}
|
|
||||||
</Link>
|
|
||||||
</IconWithContent>
|
|
||||||
</Item>
|
|
||||||
)}
|
|
||||||
</Cell>
|
</Cell>
|
||||||
<Cell flexEnd={"45em"}>
|
<Cell flexEnd={"45em"}>
|
||||||
{email && (
|
<Item>
|
||||||
<Item>
|
<IconWithContent>
|
||||||
<IconWithContent>
|
<Icon color="dark" size="lg">
|
||||||
<Icon color="dark" size="lg">
|
<Envelope />
|
||||||
<Envelope />
|
</Icon>
|
||||||
</Icon>
|
<Link
|
||||||
<Link
|
weight="bold"
|
||||||
weight="bold"
|
color="dark"
|
||||||
color="dark"
|
size="md"
|
||||||
size="md"
|
to="mailto:quotations@abcprojectdesign.com"
|
||||||
to={`mailto:${email}`}
|
noDecoration
|
||||||
noDecoration
|
>
|
||||||
>
|
quotations@abcprojectdesign.com
|
||||||
{email}
|
</Link>
|
||||||
</Link>
|
</IconWithContent>
|
||||||
</IconWithContent>
|
</Item>
|
||||||
</Item>
|
|
||||||
)}
|
|
||||||
</Cell>
|
</Cell>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Text size="xs">© {year} Abc Project Ltd</Text>
|
<Text size="xs">© {year} Abc Project Ltd</Text>
|
||||||
|
|||||||
@@ -1,16 +1,9 @@
|
|||||||
{
|
{
|
||||||
"team": [
|
"team": [
|
||||||
{
|
|
||||||
"name": "Nicholas Day",
|
|
||||||
"email": "quotations@abcprojectdesign.com",
|
|
||||||
"phone": "07539 051512",
|
|
||||||
"altPhone": "01708 938455",
|
|
||||||
"title": "Head of Sales and Marketing"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "Daniel Costea",
|
"name": "Daniel Costea",
|
||||||
"email": "daniel.costea@abcprojectdesign.com",
|
"email": "daniel.costea@abcprojectdesign.com",
|
||||||
"phone": "07378 839358",
|
"phone": "07378839358",
|
||||||
"title": "Project Director"
|
"title": "Project Director"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,15 +17,15 @@ import {
|
|||||||
Section,
|
Section,
|
||||||
Select,
|
Select,
|
||||||
Team,
|
Team,
|
||||||
Text
|
Text,
|
||||||
} from "../components";
|
} from "../components";
|
||||||
import CheckCircleIcon from "../icons/check-circle.svg";
|
import CheckCircleIcon from "../icons/check-circle.svg";
|
||||||
import EnvelopeIcon from "../icons/envelope.svg";
|
import EnvelopeIcon from "../icons/envelope.svg";
|
||||||
import TeamIcon from "../icons/team.svg";
|
import TeamIcon from "../icons/team.svg";
|
||||||
|
|
||||||
const encode = data => {
|
const encode = (data) => {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
Object.keys(data).forEach(k => {
|
Object.keys(data).forEach((k) => {
|
||||||
formData.append(k, data[k]);
|
formData.append(k, data[k]);
|
||||||
});
|
});
|
||||||
return formData;
|
return formData;
|
||||||
@@ -34,7 +34,7 @@ const encode = data => {
|
|||||||
export default function Index({ data }) {
|
export default function Index({ data }) {
|
||||||
const [formState, setFormState] = useState();
|
const [formState, setFormState] = useState();
|
||||||
|
|
||||||
const handleSubmit = e => {
|
const handleSubmit = (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
setFormState("submitting");
|
setFormState("submitting");
|
||||||
const body = encode({
|
const body = encode({
|
||||||
@@ -46,10 +46,10 @@ export default function Index({ data }) {
|
|||||||
stage: e.target.stage.value,
|
stage: e.target.stage.value,
|
||||||
status: e.target.status.value,
|
status: e.target.status.value,
|
||||||
budget: e.target.budget.value,
|
budget: e.target.budget.value,
|
||||||
message: e.target.message.value
|
message: e.target.message.value,
|
||||||
});
|
});
|
||||||
fetch("/contact", { method: "POST", body })
|
fetch("/contact", { method: "POST", body })
|
||||||
.then(res => {
|
.then((res) => {
|
||||||
if (res.status !== 200) {
|
if (res.status !== 200) {
|
||||||
setFormState("error");
|
setFormState("error");
|
||||||
} else {
|
} else {
|
||||||
@@ -127,7 +127,7 @@ export default function Index({ data }) {
|
|||||||
name="contact"
|
name="contact"
|
||||||
method="POST"
|
method="POST"
|
||||||
action="/contact"
|
action="/contact"
|
||||||
onSubmit={e => handleSubmit(e, scroll)}
|
onSubmit={(e) => handleSubmit(e, scroll)}
|
||||||
data-netlify="true"
|
data-netlify="true"
|
||||||
data-netlify-honeypot="bot-field"
|
data-netlify-honeypot="bot-field"
|
||||||
>
|
>
|
||||||
@@ -149,12 +149,12 @@ export default function Index({ data }) {
|
|||||||
{ value: "ready to hire", label: "I'm ready to hire" },
|
{ value: "ready to hire", label: "I'm ready to hire" },
|
||||||
{
|
{
|
||||||
value: "budgeting and planning",
|
value: "budgeting and planning",
|
||||||
label: "I'm planning and budgeting"
|
label: "I'm planning and budgeting",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: "quote for insurance",
|
value: "quote for insurance",
|
||||||
label: "I need a quote for insurance"
|
label: "I need a quote for insurance",
|
||||||
}
|
},
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
<Label htmlFor="contact-start">
|
<Label htmlFor="contact-start">
|
||||||
@@ -170,7 +170,7 @@ export default function Index({ data }) {
|
|||||||
{ value: "within 2 weeks", label: "Within 2 weeks" },
|
{ value: "within 2 weeks", label: "Within 2 weeks" },
|
||||||
{ value: "within 1 month", label: "Within 1 month" },
|
{ value: "within 1 month", label: "Within 1 month" },
|
||||||
{ value: "within 2 months", label: "Within 2 months" },
|
{ value: "within 2 months", label: "Within 2 months" },
|
||||||
{ value: "not sure", label: "Not sure" }
|
{ value: "not sure", label: "Not sure" },
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
<Label htmlFor="contact-status">
|
<Label htmlFor="contact-status">
|
||||||
@@ -186,8 +186,8 @@ export default function Index({ data }) {
|
|||||||
{ value: "tenant", label: "I am a tenant" },
|
{ value: "tenant", label: "I am a tenant" },
|
||||||
{
|
{
|
||||||
value: "council property",
|
value: "council property",
|
||||||
label: "It's a council property"
|
label: "It's a council property",
|
||||||
}
|
},
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
<Label htmlFor="contact-budget">What is your budget?</Label>
|
<Label htmlFor="contact-budget">What is your budget?</Label>
|
||||||
@@ -205,7 +205,7 @@ export default function Index({ data }) {
|
|||||||
{ value: "under £9,000", label: "Under £9,000" },
|
{ value: "under £9,000", label: "Under £9,000" },
|
||||||
{ value: "under £10,000", label: "Under £10,000" },
|
{ value: "under £10,000", label: "Under £10,000" },
|
||||||
{ value: "under £15,000", label: "Under £15,000" },
|
{ value: "under £15,000", label: "Under £15,000" },
|
||||||
{ value: "under £20,000", label: "Under £20,000" }
|
{ value: "under £20,000", label: "Under £20,000" },
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
<Label htmlFor="contact-message">
|
<Label htmlFor="contact-message">
|
||||||
@@ -235,7 +235,7 @@ export default function Index({ data }) {
|
|||||||
<Map
|
<Map
|
||||||
initialCenter={{
|
initialCenter={{
|
||||||
lat: 51.5614,
|
lat: 51.5614,
|
||||||
lng: 0.1071
|
lng: 0.1071,
|
||||||
}}
|
}}
|
||||||
zoom={10}
|
zoom={10}
|
||||||
scrollwheel={false}
|
scrollwheel={false}
|
||||||
@@ -270,7 +270,6 @@ export const query = graphql`
|
|||||||
name
|
name
|
||||||
email
|
email
|
||||||
phone
|
phone
|
||||||
altPhone
|
|
||||||
title
|
title
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user