From e6a5b57f4c05d9ee89cf1950d8662e5b6e91de41 Mon Sep 17 00:00:00 2001 From: Dan Head Date: Sun, 7 Feb 2021 22:59:11 +0000 Subject: [PATCH] refactor(footer): use team data --- src/components/footer.js | 147 +++++++++++++++++++++++---------------- 1 file changed, 88 insertions(+), 59 deletions(-) diff --git a/src/components/footer.js b/src/components/footer.js index 741e84d..e4f988d 100644 --- a/src/components/footer.js +++ b/src/components/footer.js @@ -1,4 +1,5 @@ import React from "react"; +import { graphql, StaticQuery } from "gatsby"; import styled from "@emotion/styled"; import { css } from "@emotion/react"; import { Grid, IconWithContent, Icon, Link, Text } from "."; @@ -37,64 +38,92 @@ const Item = styled.div` export default function Footer() { const year = new Date().getFullYear(); return ( - - - - - - - - - - - 07539 051512 - - - - - - - - - - 07378 839358 - - - - - - - - - - - - quotations@abcprojectdesign.com - - - - - - © {year} Abc Project Ltd - - + { + const { phone, altPhone, email } = data.allPerson.nodes[0]; + return ( + + + + + {phone && ( + + + + + + + {phone} + + + + )} + {altPhone && ( + + + + + + + {altPhone} + + + + )} + + + {email && ( + + + + + + + {email} + + + + )} + + + © {year} Abc Project Ltd + + + ); + }} + /> ); }