From 1c40d2d428f9fe81ec25d7eb679d9e604ea3982a Mon Sep 17 00:00:00 2001 From: gingervitis Date: Sat, 28 Nov 2020 18:43:59 -0800 Subject: [PATCH] fix react warnings on config page --- web/pages/components/key-value-table.tsx | 8 ++--- web/pages/index.tsx | 5 --- web/pages/update-server-config.tsx | 40 +++++++++++------------- web/styles/styles.module.css | 4 +++ 4 files changed, 27 insertions(+), 30 deletions(-) diff --git a/web/pages/components/key-value-table.tsx b/web/pages/components/key-value-table.tsx index b9a45a7b68..8169b28931 100644 --- a/web/pages/components/key-value-table.tsx +++ b/web/pages/components/key-value-table.tsx @@ -17,9 +17,9 @@ export default function KeyValueTable({ title, data }) { ]; return ( -
- {title} - - + <> + {title} +
+ ); } diff --git a/web/pages/index.tsx b/web/pages/index.tsx index 9aae37ceed..d14d7f5cd2 100644 --- a/web/pages/index.tsx +++ b/web/pages/index.tsx @@ -8,9 +8,7 @@ Will display an overview with the following datasources: TODO: Link each overview value to the sub-page that focuses on it. GW: to do: -- Hardware + Viewer count views- top 3 boxes - restyle - Home - more box shadoe? -- maybe not have "current stream" nav section - maybe make outbound/inbound smaller (since it's fixed info for current stream) - reformat "Inbound Video Stream" section. */ @@ -31,9 +29,6 @@ import { } from "../utils/apis"; import { formatIPAddress, isEmptyObject } from "../utils/format"; -const { Title } = Typography; - - export default function Home() { const serverStatusData = useContext(ServerStatusContext); const { broadcaster, serverConfig: configData } = serverStatusData || {}; diff --git a/web/pages/update-server-config.tsx b/web/pages/update-server-config.tsx index cb3c59c869..b38c12c1a0 100644 --- a/web/pages/update-server-config.tsx +++ b/web/pages/update-server-config.tsx @@ -4,6 +4,7 @@ import { Table, Typography, Input } from 'antd'; import { isEmptyObject } from '../utils/format'; import KeyValueTable from "./components/key-value-table"; import { ServerStatusContext } from '../utils/server-status-context'; +import adminStyles from '../styles/styles.module.css'; const { Title } = Typography; const { TextArea } = Input; @@ -32,12 +33,13 @@ function SocialHandles({ config }) { } return ( -
- Social Handles +
+ Social Handles
); @@ -98,12 +100,12 @@ function InstanceDetails({ config }) { return ( <> -

- -

-

- -

+
+ +
+
+ +
); } @@ -113,8 +115,8 @@ function PageContent({ config }) { return null; } return ( -
- Page content +
+ Page content