Created
June 12, 2018 21:37
-
-
Save Jeyloh/9504259afb5547c08ebbd6313954bbc6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { Auth } from "aws-amplify" | |
const Header = () => { | |
const handleLogout = () => { | |
Auth.signOut().then( () => { | |
window.location.reload() | |
}) | |
} | |
return ( | |
<header style={styles.header}> | |
<button style={styles.absoluteLogout} onClick={() => handleLogout()}>Sign out</button> | |
<h1 style={styles.headerTitle}>Your recipe cookbook!</h1> | |
<span className="App-logo" role="img" aria-label="Logo" alt="cooking-pot">🍲</span> | |
</header> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment