diff --git a/frontend/src/components/authorization/AuthorizationBrowseBox.tsx b/frontend/src/components/authorization/AuthorizationBrowseBox.tsx index b7f426d..fcf798d 100644 --- a/frontend/src/components/authorization/AuthorizationBrowseBox.tsx +++ b/frontend/src/components/authorization/AuthorizationBrowseBox.tsx @@ -1,15 +1,12 @@ import {faLock, faUniversity} from "@fortawesome/free-solid-svg-icons" import {FontAwesomeIcon} from "@fortawesome/react-fontawesome" -import {navigate} from "@reach/router" import {Box, Form, Heading, Idiomatic as I} from "@steffo/bluelib-react" import * as React from "react" import {useAuthorizationContext} from "../../contexts/authorization" -import {useSophonPath} from "../../hooks/useSophonPath" export function AuthorizationBrowseBox(): JSX.Element { const authorization = useAuthorizationContext() - const path = useSophonPath() const canBrowse = React.useMemo( @@ -29,12 +26,8 @@ export function AuthorizationBrowseBox(): JSX.Element { authorization.dispatch({ type: "browse", }) - - if(!path.loggedIn) { - await navigate("l/") - } }, - [authorization, path] + [authorization], ) return ( diff --git a/frontend/src/components/authorization/AuthorizationLoginBox.tsx b/frontend/src/components/authorization/AuthorizationLoginBox.tsx index 69083fb..f972095 100644 --- a/frontend/src/components/authorization/AuthorizationLoginBox.tsx +++ b/frontend/src/components/authorization/AuthorizationLoginBox.tsx @@ -1,6 +1,5 @@ import {faExclamationCircle} from "@fortawesome/free-solid-svg-icons" import {FontAwesomeIcon} from "@fortawesome/react-fontawesome" -import {navigate} from "@reach/router" import {Box, Form, Heading, useFormState} from "@steffo/bluelib-react" import * as React from "react" import {useAuthorizationContext} from "../../contexts/authorization" @@ -64,8 +63,6 @@ export function AuthorizationLoginBox(): JSX.Element { }) return } - - await navigate("l/") }, [axios, authorization, username, password], ) @@ -113,8 +110,8 @@ export function AuthorizationLoginBox(): JSX.Element { If you do not have one, you can ask your system administrator to create one for you.