From e0ce9a35acf4e5e795ed4edaf1df4ac2effd3d96 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Mon, 16 Nov 2020 14:32:37 -0800 Subject: [PATCH] Fix typescript build errors --- web/pages/components/log-table.tsx | 2 +- web/pages/components/statistic.tsx | 4 ++-- web/pages/upgrade.tsx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/pages/components/log-table.tsx b/web/pages/components/log-table.tsx index ce543f19b..b63e1236a 100644 --- a/web/pages/components/log-table.tsx +++ b/web/pages/components/log-table.tsx @@ -30,7 +30,7 @@ interface Props { } export default function LogTable({ logs, pageSize }: Props) { - if (!logs.length) { + if (!logs?.length) { return null; } const columns = [ diff --git a/web/pages/components/statistic.tsx b/web/pages/components/statistic.tsx index beefee620..ae5b5568b 100644 --- a/web/pages/components/statistic.tsx +++ b/web/pages/components/statistic.tsx @@ -5,7 +5,7 @@ interface StatisticItemProps { title?: string, value?: any, prefix?: JSX.Element, - // color?: string, + color?: string, progress?: boolean, centered?: boolean, }; @@ -13,7 +13,7 @@ const defaultProps = { title: '', value: 0, prefix: null, - // color: '', + color: '', progress: false, centered: false, }; diff --git a/web/pages/upgrade.tsx b/web/pages/upgrade.tsx index 7e0836c29..a0e7e2c32 100644 --- a/web/pages/upgrade.tsx +++ b/web/pages/upgrade.tsx @@ -6,7 +6,7 @@ import { getGithubRelease } from "../utils/apis"; const { Title } = Typography; function AssetTable(assets) { - const data = Object.values(assets); + const data = Object.values(assets) as object[]; const columns = [ {