github.com/treeverse/lakefs@v1.24.1-0.20240520134607-95648127bfb0/webui/src/lib/hooks/user.jsx (about)

     1  import {useAPI} from "./api";
     2  import {auth} from "../api";
     3  
     4  
     5  const useUser = () => {
     6      const { response, loading, error } = useAPI(() => auth.getCurrentUserWithCache(), []);
     7      return { user: response, loading, error };
     8  }
     9  
    10  export default useUser;