From 4fae11d05d79d2b1fa5b1348395369e08f13619d Mon Sep 17 00:00:00 2001 From: Moris Zen Date: Wed, 12 Sep 2018 14:35:30 +0200 Subject: [PATCH] Refactor SEO component --- src/components/SEO.js | 71 ++++++++++++++++++----------------- src/templates/post-default.js | 11 +----- 2 files changed, 38 insertions(+), 44 deletions(-) diff --git a/src/components/SEO.js b/src/components/SEO.js index bbd8d1f..a31e496 100644 --- a/src/components/SEO.js +++ b/src/components/SEO.js @@ -1,43 +1,44 @@ import React, { Component } from 'react' import Helmet from 'react-helmet' -import urljoin from 'url-join' import ImgIntro from '../images/web-development-company.svg' -const SEO = ({ ...props }) => ( - - - {props.siteTitle - ? props.siteTitle - : 'Saburly - App Development & Mobile Design agency that makes you stand out'} - - - +class SEO extends Component { + render() { + const { siteTitle, siteDescription, siteImage, siteUrl} = this.props - - - - - - - + let title = siteTitle ? siteTitle : 'Saburly - App Development & Mobile Design agency that makes you stand out' + let desc = siteDescription ? siteDescription : 'We are in the business of solving real-world problems with digital solutions. Our mission is to make you stand out with the help of modern technologies' + let img = siteImage ? siteImage : ImgIntro - - - - - - - - - - - -) + return ( + + + {title} + + + + + + + + + + + + + + + + + + + + + + + + ) + } +} export default SEO diff --git a/src/templates/post-default.js b/src/templates/post-default.js index 721c6c6..e7c6973 100644 --- a/src/templates/post-default.js +++ b/src/templates/post-default.js @@ -1,6 +1,7 @@ import React, { Component } from 'react' import Helmet from 'react-helmet' import Prism from 'prismjs' +import SEO from '../components/SEO' require('prismjs/themes/prism-tomorrow.css') @@ -19,16 +20,8 @@ class PostDefault extends Component { const { data } = this.props return ( +