
function App() {

    var [render, setRender] = React.useState(Math.random());
    window.setRender = setRender;

    var signUp = () => {
        fetch("/PHP/signup.php", {
            method: "POST",
            body: window.nlEmail
        })
    }

    return (
        <>
            <SmorsleHeader></SmorsleHeader>
            <BlogGrid></BlogGrid>
            <div className="newsLetter">
                <h1>Newsletter</h1>
                <input onChange={(e) => window.nlEmail = e.target.value} placeholder="Enter Email" type="text"/>
                <Button onPress={signUp} auto>
                    Sign Up
                </Button>
            </div>
        </>
    );
}

var domNode = document.getElementById('root');
var root = ReactDOM.createRoot(domNode);
root.render(<App/>);