December 2019
Intermediate to advanced
598 pages
12h 21m
English
At the moment, the Header component shows the Sign Up and Sign Out options, but the Sign In option is only relevant if the user hasn't signed in. The Sign Out option is only relevant if the user is authenticated. Let's clean this up in Header.tsx in the following steps:
import { useAuth } from './Auth';
export const Header: FC<RouteComponentProps> = ( ... ) => { ... const { isAuthenticated, user, loading } = useAuth(); return ( ... );};
Read now
Unlock full access