import { StyledNav, StyledDiv,Logo } from './styled'; import React from 'react' import { FormattedMessage } from 'react-intl' import { Link } from 'react-router-dom' const logo = require('../../../images/header-logo.png') interface HeaderProps { type: 'only-signup' | 'only-signin' | 'none'; } class Header extends React.Component { constructor(props: HeaderProps) { super(props); this.state = { type: props.type }; } 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 if (pageType === 'none') { text = ''; signUpButton = ''; } else { signUpButton = signInButton = ; } return ( logo {text} {signUpButton} {signInButton} ) }; } interface ButtonProps { style?: 'style1' | 'style2' | 'style3'; className?: string; } const SignInButton = (props: ButtonProps) => { const style = props.style ? props.style : 'style1'; return ( ); } const SignUpButton = (props: ButtonProps) => { const style = props.style ? props.style : 'style1'; return ( ); } export { SignInButton, SignUpButton }; export default Header;