mirror of
https://github.com/Steffo99/sophon.git
synced 2024-12-22 23:04:21 +00:00
🧹 Fix warnings
This commit is contained in:
parent
615a59806a
commit
d62df362d3
5 changed files with 6 additions and 8 deletions
|
@ -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<string>("", Validators.doNotValidate)
|
||||
|
@ -20,7 +18,7 @@ export function AuthorizationLoginBox(): JSX.Element {
|
|||
() => (
|
||||
authorization !== undefined && authorization.state.token === undefined
|
||||
),
|
||||
[axios, authorization],
|
||||
[authorization],
|
||||
)
|
||||
|
||||
return (
|
||||
|
|
|
@ -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 =
|
||||
|
|
|
@ -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(
|
||||
() => (
|
||||
<Box>
|
||||
|
|
|
@ -633,6 +633,6 @@ export function useManagedViewSet<Resource extends DjangoResource>(baseRoute: st
|
|||
command,
|
||||
}
|
||||
},
|
||||
[state, resources, refresh, create, command]
|
||||
[state, resources, refresh, create, command, viewset],
|
||||
)
|
||||
}
|
||||
|
|
|
@ -158,6 +158,6 @@ export function useViewSet<Resource>(baseRoute: string): ViewSet<Resource> | und
|
|||
|
||||
return {command, action, list, retrieve, create, update, destroy}
|
||||
},
|
||||
[command, action, list, retrieve, create, update, destroy],
|
||||
[api, command, action, list, retrieve, create, update, destroy],
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue