From 1996e665148ec0604cb409ed2bfa88f0832b541a Mon Sep 17 00:00:00 2001 From: tanxan Date: Mon, 6 Jul 2026 15:14:40 +0000 Subject: [PATCH 1/2] fix(hosting): use dynamic hostname for external link --- src/components/Home/index.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/Home/index.tsx b/src/components/Home/index.tsx index a4af30800..22efb861e 100644 --- a/src/components/Home/index.tsx +++ b/src/components/Home/index.tsx @@ -28,7 +28,7 @@ import { Typography } from '@rmwc/typography'; import React from 'react'; import { Link } from 'react-router-dom'; -import { Config, EmulatorConfig } from '../../store/config'; +import { Config, EmulatorConfig, hostAndPort } from '../../store/config'; import { useConfigOptional } from '../common/EmulatorConfigProvider'; import { AuthIcon, @@ -115,7 +115,10 @@ const Overview: React.FC< icon={} config={config.hosting} testId="emulator-info-hosting" - linkToExternal={config.hosting && `//${config.hosting.hostAndPort}/`} + linkToExternal={ + config.hosting && + `//${hostAndPort(window.location.hostname, config.hosting.port)}/` + } linkLabel="View website" /> Date: Mon, 6 Jul 2026 22:59:33 +0700 Subject: [PATCH 2/2] Update src/components/Home/index.tsx Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- src/components/Home/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Home/index.tsx b/src/components/Home/index.tsx index 22efb861e..4d1e506a7 100644 --- a/src/components/Home/index.tsx +++ b/src/components/Home/index.tsx @@ -117,7 +117,7 @@ const Overview: React.FC< testId="emulator-info-hosting" linkToExternal={ config.hosting && - `//${hostAndPort(window.location.hostname, config.hosting.port)}/` + `//${hostAndPort(window.location.hostname.replace('[', '').replace(']', ''), config.hosting.port)}/` } linkLabel="View website" />