diff --git a/.gitignore b/.gitignore index 6d75e58..df6f54e 100644 --- a/.gitignore +++ b/.gitignore @@ -70,3 +70,4 @@ yarn-error.log .idea +schema.graphql diff --git a/.graphqlconfig b/.graphqlconfig new file mode 100644 index 0000000..35a4192 --- /dev/null +++ b/.graphqlconfig @@ -0,0 +1,16 @@ + +{ + "name": "dwysokinski.me", + "schemaPath": "schema.graphql", + "extensions": { + "endpoints": { + "Default GraphQL Endpoint": { + "url": "http://localhost:8000/___graphql", + "headers": { + "user-agent": "IDE" + }, + "introspect": true + } + } + } +} diff --git a/gatsby-config.js b/gatsby-config.js index 9d97812..796d695 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -7,6 +7,9 @@ module.exports = { authorTwitter: `@Dawid56143781`, authorFullName: 'Dawid WysokiƄski', siteUrl, + email: 'contact@dwysokinski.me', + github: 'https://github.com/Kichiyaki', + facebook: 'https://www.facebook.com/dawidwysokinski00', }, plugins: [ `gatsby-plugin-react-helmet`, diff --git a/src/features/HomePage/components/Contact.js b/src/features/HomePage/components/Contact.js index 5cd008b..bf77cdb 100644 --- a/src/features/HomePage/components/Contact.js +++ b/src/features/HomePage/components/Contact.js @@ -1,4 +1,5 @@ import React from 'react'; +import { graphql, useStaticQuery } from 'gatsby'; import { makeStyles } from '@material-ui/core/styles'; import { Typography, Container, Link } from '@material-ui/core'; @@ -14,34 +15,46 @@ export const SECTION_ID = 'contact'; function Contact() { const classes = useStyles(); + const { + site: { siteMetadata }, + } = useStaticQuery( + graphql` + query { + site { + siteMetadata { + email + github + facebook + } + } + } + ` + ); + const linkProps = { underline: 'hover', color: 'secondary', }; - return (
- - contact@dwysokinski.me + + {siteMetadata.email} - - Kichiyaki + + {siteMetadata.github.replace('https://github.com/', '')} - - /dawidwysokinski00 + + {siteMetadata.facebook.replace('https://facebook.com', '')}