import React, { PureComponent, Fragment } from 'react' import PropTypes from 'prop-types' import Helmet from 'react-helmet' import { FadeIn } from '../atoms/Animations' import { ReactComponent as Day } from '../../images/day.svg' import { ReactComponent as Night } from '../../images/night.svg' import './ThemeSwitch.scss' const ThemeToggle = props => { return ( ) } class ThemeSwitch extends PureComponent { constructor(props) { super(props) this.state = { dark: false } } componentDidMount() { const now = new Date().getHours() if (now >= 19 || now <= 7) { this.setState({ dark: true }) } } isDark = () => this.state.dark === true handleChange = () => { this.setState({ dark: !this.isDark() }) } render() { return ( ) } } ThemeToggle.propTypes = { dark: PropTypes.bool } export default ThemeSwitch