diff --git a/frontend/src/components/authorization/AuthorizationLoginBox.tsx b/frontend/src/components/authorization/AuthorizationLoginBox.tsx index 05463a4..ba1603a 100644 --- a/frontend/src/components/authorization/AuthorizationLoginBox.tsx +++ b/frontend/src/components/authorization/AuthorizationLoginBox.tsx @@ -4,12 +4,10 @@ import * as React from "react" import {useAuthorizationContext} from "../../contexts/authorization" import {Validators} from "../../utils/Validators" import {IconText} from "../elements/IconText" -import {useInstanceAxios} from "../instance/useInstanceAxios" import {AuthorizationLoginButton} from "./AuthorizationLoginButton" export function AuthorizationLoginBox(): JSX.Element { - const axios = useInstanceAxios() const authorization = useAuthorizationContext() const username = useFormState("", Validators.doNotValidate) @@ -20,7 +18,7 @@ export function AuthorizationLoginBox(): JSX.Element { () => ( authorization !== undefined && authorization.state.token === undefined ), - [axios, authorization], + [authorization], ) return ( diff --git a/frontend/src/components/authorization/AuthorizationLoginButton.tsx b/frontend/src/components/authorization/AuthorizationLoginButton.tsx index 49b2462..b43b5e4 100644 --- a/frontend/src/components/authorization/AuthorizationLoginButton.tsx +++ b/frontend/src/components/authorization/AuthorizationLoginButton.tsx @@ -25,7 +25,7 @@ export function AuthorizationLoginButton({username, password, disabled = false}: () => ( !disabled && authorization !== undefined && !authorization.state.running && username !== "" && password !== "" ), - [authorization, username, password], + [disabled, authorization, username, password], ) const doLogin = diff --git a/frontend/src/components/elements/DescriptionBox.tsx b/frontend/src/components/elements/DescriptionBox.tsx index b7ddda3..0b49fd6 100644 --- a/frontend/src/components/elements/DescriptionBox.tsx +++ b/frontend/src/components/elements/DescriptionBox.tsx @@ -5,14 +5,14 @@ import * as React from "react" import ReactMarkdown from "react-markdown" -export interface DescriptionBox { +export interface DescriptionBoxProps { icon: IconDefinition, name: string, description: string, } -export function DescriptionBox({icon, name, description}: DescriptionBox): JSX.Element { +export function DescriptionBox({icon, name, description}: DescriptionBoxProps): JSX.Element { return React.useMemo( () => ( diff --git a/frontend/src/hooks/useManagedViewSet.ts b/frontend/src/hooks/useManagedViewSet.ts index 8a76f7f..e16eb64 100644 --- a/frontend/src/hooks/useManagedViewSet.ts +++ b/frontend/src/hooks/useManagedViewSet.ts @@ -633,6 +633,6 @@ export function useManagedViewSet(baseRoute: st command, } }, - [state, resources, refresh, create, command] + [state, resources, refresh, create, command, viewset], ) } diff --git a/frontend/src/hooks/useViewSet.ts b/frontend/src/hooks/useViewSet.ts index 12baa28..f9fefb8 100644 --- a/frontend/src/hooks/useViewSet.ts +++ b/frontend/src/hooks/useViewSet.ts @@ -158,6 +158,6 @@ export function useViewSet(baseRoute: string): ViewSet | und return {command, action, list, retrieve, create, update, destroy} }, - [command, action, list, retrieve, create, update, destroy], + [api, command, action, list, retrieve, create, update, destroy], ) }