import React from 'react'; import { FormattedMessage } from 'react-intl' //const logo = require('./images/header-logo.png') interface HeaderProps { type: string; } class Header extends React.Component { constructor(props: HeaderProps) { super(props); this.state = props; } render() { let signUpButton; let signInButton; let text; const pageType = this.state.type; if (pageType === 'only-signup') { text = ; signUpButton = ; } else if (pageType === 'only-signin') { text = ; signUpButton = ; } else { signUpButton = signInButton = ; } return ( ) }; } interface ButtonProps { className: string; } const SignInButton = (props: ButtonProps) => { return ( ); } const SignUpButton = (props: ButtonProps) => { return ( ); } export default Header;