fix: link in admin/home not working if not localhost

Massimo Melina committed Feb 7, 2022 at 10:20 UTC 6249f04d34239e8eaec5f5bc5c26ec14038af681
1 file changed +1 -1
admin/src/HomePage.ts
+1 -1
@@ -8,7 +8,7 @@ export default function HomePage() {
8 const { http, https } = res || {}
9 const secure = !http?.active && https?.active ? 's' : ''
10 const srv = secure ? https : (http?.active && http)
11 - const href = srv && `http${secure}://localhost`+ (srv.port === (secure ? 443 : 80) ? '' : ':'+srv.port)
11 + const href = srv && `http${secure}://`+window.location.hostname + (srv.port === (secure ? 443 : 80) ? '' : ':'+srv.port)
12 return h(Box, { flex: 1 },
13 h(Typography, { variant: 'h4' },
14 !res ? spinner()