import { StyledNav, StyledDiv, Logo } from './styled'; import React from 'react' import { FormattedMessage } from 'react-intl' import { Link } from 'react-router-dom' import Button from '@material-ui/core/Button'; import logo from '../../../images/logo-small.svg'; interface HeaderProps { type: 'only-signup' | 'only-signin' | 'none'; } class Header extends React.Component { constructor(props: HeaderProps) { super(props); this.state = { type: props.type }; } render(): React.ReactElement { 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 { className?: string; } const SignInButton = (props: ButtonProps): React.ReactElement => { return ( ); } const SignUpButton = (props: ButtonProps): React.ReactElement => { return ( ); } export { SignInButton, SignUpButton }; export default Header;