Remove your Home constant completely, use the div inside your header as you are already making a call to "user" there, something like this (you need to play with it as I have no idea what end result you require) -
function Header() {
const [user, setUser] = useState(null);
useEffect(() => {
firebase.auth().onAuthStateChanged((user) => {
setUser(user);
});
}, []);
return (
<div>
<h1>
Hello, <span></span>
{user.displayName}
</h1>
auth.signOut()}>
Sign out
</div>
<menu secondary="">
<menu.menu position="right">
<div>{user ? <home user="{user}"> : <login>}</div>
);
}
export default Header;