const preact = require('preact');

function renderSpawnButton({ account, sendConstructSpawn }) {
    let name = '';

    if (!account) return <div>...</div>;

    return false;

    return (
        <div className="row">
            <div className="two columns">
                <input
                    className="input"
                    type="text"
                    placeholder="construct name"
                    onChange={e => (name = e.target.value)}
                />
            </div>
            <div className="two columns">
                <button
                    className="button"
                    type="submit"
                    onClick={() => sendConstructSpawn(name)}>
                    Spawn 👾
                </button>
            </div>
        </div>
    );
}

module.exports = renderSpawnButton;
