// 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">
            <h3 className="header-username">{account.name}</h3>
            {saw('stat-icon')}
        </div>)
        : '';

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


module.exports = renderHeader;
