import React from "react";
import {Link} from 'react-router-dom';

import style from "./headerButtonForAccount.module.sass";

const HeaderButtonsForAccount = (props) => {

    if(props.isFetching) {
        return <div />
    }else if(props.userName) {
        return <a href={'/cabinet'}>Привет, {props.userName}</a>;
    }
    return (
        <div className={style.mainContainer}>
            <Link to={'/signUp'}>Регистрация</Link>
            <Link to={'/auth'}>Авторизация</Link>
        </div>
    )

};

export default HeaderButtonsForAccount;