client/contexts/AuthContext.js
/*this hook makes it so that we dont need to access
the auth context outside of this file
*/
this hook makes it so that we dont need to access
the auth context outside of this file
this hook makes it so that we dont need to access the auth context outside of this file
function useAuth() {
  const context = useContext(AuthContext);
  if (context === undefined) {
    throw new Error("useCount must be used within a CountProvider");
  }
  return context;
}
function useAuth ( ) { const context = useContext ( AuthContext ) ; if ( context === undefined ) { throw new Error ( "useCount must be used within a CountProvider" ) ; } return context ; }
this hook makes it so that we dont need to access
the auth context outside of this file
this hook makes it so that we dont need to access the auth context outside of this file
// const history = useHistory();