From 67d7b9a112363296b4d11afb1d389a652b36c8b9 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Wed, 13 Oct 2021 16:24:22 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20Fix=20warnings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/App.tsx | 2 +- .../elements/{DescriptionBox.tsx => DescriptionBoxProps.tsx} | 4 ++-- frontend/src/components/generic/ResourceDescriptionBox.tsx | 4 ++-- frontend/src/components/informative/SophonDescriptionBox.tsx | 2 +- frontend/src/components/instance/InstanceDescriptionBox.tsx | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) rename frontend/src/components/elements/{DescriptionBox.tsx => DescriptionBoxProps.tsx} (91%) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 79c79c2..bd293f3 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -60,8 +60,8 @@ function App({..._}: RouteComponentProps) { <> - + } selectedRoute={({selection}) => <> diff --git a/frontend/src/components/elements/DescriptionBox.tsx b/frontend/src/components/elements/DescriptionBoxProps.tsx similarity index 91% rename from frontend/src/components/elements/DescriptionBox.tsx rename to frontend/src/components/elements/DescriptionBoxProps.tsx index b7ddda3..0b49fd6 100644 --- a/frontend/src/components/elements/DescriptionBox.tsx +++ b/frontend/src/components/elements/DescriptionBoxProps.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/components/generic/ResourceDescriptionBox.tsx b/frontend/src/components/generic/ResourceDescriptionBox.tsx index 964d80e..6ccc14c 100644 --- a/frontend/src/components/generic/ResourceDescriptionBox.tsx +++ b/frontend/src/components/generic/ResourceDescriptionBox.tsx @@ -1,7 +1,7 @@ import {IconDefinition} from "@fortawesome/fontawesome-svg-core" import * as React from "react" import {ManagedResource} from "../../hooks/useManagedViewSet" -import {DescriptionBox} from "../elements/DescriptionBox" +import {DescriptionBox} from "../elements/DescriptionBoxProps" export interface NamedAndDescribed { @@ -25,6 +25,6 @@ export function ResourceDescriptionBox({resource, i description={resource.value.description} /> ), - [resource], + [resource, icon], ) } diff --git a/frontend/src/components/informative/SophonDescriptionBox.tsx b/frontend/src/components/informative/SophonDescriptionBox.tsx index 669df72..7c1615d 100644 --- a/frontend/src/components/informative/SophonDescriptionBox.tsx +++ b/frontend/src/components/informative/SophonDescriptionBox.tsx @@ -1,6 +1,6 @@ import {faServer} from "@fortawesome/free-solid-svg-icons" import * as React from "react" -import {DescriptionBox} from "../elements/DescriptionBox" +import {DescriptionBox} from "../elements/DescriptionBoxProps" export function SophonDescriptionBox(): JSX.Element { diff --git a/frontend/src/components/instance/InstanceDescriptionBox.tsx b/frontend/src/components/instance/InstanceDescriptionBox.tsx index 51c535e..a829f00 100644 --- a/frontend/src/components/instance/InstanceDescriptionBox.tsx +++ b/frontend/src/components/instance/InstanceDescriptionBox.tsx @@ -1,7 +1,7 @@ import {faUniversity} from "@fortawesome/free-solid-svg-icons" import * as React from "react" import {useInstanceContext} from "../../contexts/instance" -import {DescriptionBox} from "../elements/DescriptionBox" +import {DescriptionBox} from "../elements/DescriptionBoxProps" import {ErrorBox} from "../errors/ErrorBox"