{"size": 935, "ext": "js", "max_stars_repo_path": "client/src/components/Navbar.js", "max_stars_repo_name": "geeythree/NFT-zap", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "client/src/components/Navbar.js", "max_issues_repo_name": "geeythree/NFT-zap", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "client/src/components/Navbar.js", "max_forks_repo_name": "geeythree/NFT-zap", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 37.4, "max_line_length": 107, "alphanum_fraction": 0.4823529412}
import React, { useContext } from "react";
import AppContext  from "./AppContext";

const Navbar = ({signUp}) => {
    const globalContext = useContext(AppContext);
    return (
        <nav className='navbar navbar-expand-lg navbar-light bg-light'>
            <div className="container">
                <a className="navbar-brand" href="/">NFT ZAP</a>
                <div className="navbar navbar-collapse">
                    <div className="nav navbar-nav ms-auto ml-auto">
                        { !globalContext.signUp &&  
                            <li><button className='btn btn-primary' onClick={signUp}>Sign Up</button></li> 
                        }
                        { globalContext.signUp && 
                            <li>Account: {globalContext.accounts[0]}</li>
                        }
                    </div>
                </div>
            </div>
        </nav>
    );
}

export default Navbar;