removing auth dependency from shared authorized ui
This commit is contained in:
parent
9f02b47def
commit
0410a5ccae
3 changed files with 8 additions and 7 deletions
|
|
@ -1,10 +1,11 @@
|
|||
import { RedirectLoginOptions, useAuth0 } from "@auth0/auth0-react";
|
||||
import { RedirectLoginOptions } from "@auth0/auth0-react";
|
||||
// import { useAuth } from "hooks";
|
||||
import queryString from "query-string";
|
||||
import { useEffect } from "react";
|
||||
import { useLocation } from "react-router";
|
||||
// import Loading from "./Loading";
|
||||
import LoadingScreen from "app/LoadingScreen";
|
||||
import { useAuthContext } from "providers/authContext";
|
||||
|
||||
// interface Props {
|
||||
// prevPath?: string;
|
||||
|
|
@ -13,7 +14,7 @@ import LoadingScreen from "app/LoadingScreen";
|
|||
export default function Login() {
|
||||
// const { prevPath } = props;
|
||||
const location = useLocation();
|
||||
const { loginWithRedirect } = useAuth0();
|
||||
const { loginWithRedirect } = useAuthContext();
|
||||
|
||||
// const setRouteBeforeLogin = useCallback((): Promise<string> => {
|
||||
// return new Promise(function(resolve) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue