// eslint-disable-next-line
const preact = require('preact');

const { saw } = require('./shapes');

function renderHeader(args) {
    const { account } = args;
    const accountStatus = account ?
        (<div className="header-status">
            <h1 className="header-username">{account.name}</h1>
            {saw('stat-icon')}
        </div>)
        : '';

    return (
        <header>
            <h1 className="header-title">
                cryps.gg
            </h1>
            {accountStatus}
        </header>
    );
}


module.exports = renderHeader;
