fix: admin/home: console warning
Massimo Melina committed
Mar 4, 2022 at 01:30 UTC
247ed8c67aa872f8509c9f9aa9a56618dd891664
1 file changed
+4
-4
admin/src/HomePage.ts
+4
-4
@@ -1,6 +1,6 @@
1
// This file is part of HFS - Copyright 2020-2021, Massimo Melina <a@rejetto.com> - License https://www.gnu.org/licenses/gpl-3.0.txt
2
3
-import { createElement as h } from 'react'
3
+import { createElement as h, Fragment } from 'react'
4
import { Alert, Box, Link } from '@mui/material'
5
import { useApi } from './api'
6
import { Dict, dontBotherWithKeys, InLink, objSameKeys, onlyTruthy, spinner } from './misc'
@@ -39,10 +39,10 @@ export default function HomePage() {
39
) : h(Alert, { severity: 'warning' }, "Frontend unreachable: ",
40
!cfg ? '...'
41
: errors.length === 2 ? "both http and https are in error"
42
- : [
42
+ : h(Fragment, {},
43
['http','https'].map(k => k + " " + (errorMap[k] ? "is in error" : "is off")).join(', '),
44
- !errors.length && [' - ', cfgLink("switch http or https on")]
45
- ]
44
+ !errors.length && h(Fragment, {}, ' - ', cfgLink("switch http or https on"))
45
+ )
46
),
47
48
vfs?.root && !vfs.root.children?.length && !vfs.root.source &&