diff --git a/src/components/organisms/Header.jsx b/src/components/organisms/Header.jsx index 4c718f3..8f3ce7b 100644 --- a/src/components/organisms/Header.jsx +++ b/src/components/organisms/Header.jsx @@ -1,4 +1,4 @@ -import React, { PureComponent } from 'react' +import React from 'react' import { Link } from 'gatsby' import PropTypes from 'prop-types' import { FadeIn } from '../atoms/Animations' @@ -8,49 +8,24 @@ import ThemeSwitch from '../molecules/ThemeSwitch' import LogoUnit from '../atoms/LogoUnit' import styles from './Header.module.scss' -class Header extends PureComponent { - constructor(props) { - super(props) - - this.state = { classes: 'header' } - } - - componentDidMount() { - this.toggleClasses() - } - - componentDidUpdate() { - this.toggleClasses() - } - - toggleClasses = () => { - if (this.props.isHomepage) { - this.setState({ classes: styles.header }) - } else { - this.setState({ classes: `${styles.header} ${styles.minimal}` }) +const Header = ({ meta, isHomepage }) => ( +
+ + + + + + - render() { - const meta = this.props.meta - const isHomepage = this.props.isHomepage + - return ( -
- - - - - - - - - - -
- ) - } -} + +
+) Header.propTypes = { meta: PropTypes.object,