From 5ab1def0c47b4bd127d585f848c2135b69277e1f Mon Sep 17 00:00:00 2001
From: Miles Zhang <mingchang555@hotmail.com>
Date: Wed, 20 Mar 2024 11:41:08 +0800
Subject: [PATCH] chore: use window.location to get current origin

Signed-off-by: Miles Zhang <mingchang555@hotmail.com>
---
 .../StatisticsChart/activities/ContractResourceDistributed.tsx | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/pages/StatisticsChart/activities/ContractResourceDistributed.tsx b/src/pages/StatisticsChart/activities/ContractResourceDistributed.tsx
index 8e383dd9f6..3697330c61 100644
--- a/src/pages/StatisticsChart/activities/ContractResourceDistributed.tsx
+++ b/src/pages/StatisticsChart/activities/ContractResourceDistributed.tsx
@@ -3,7 +3,6 @@ import { DATA_ZOOM_CONFIG } from '../../../utils/chart'
 import { SmartChartPage } from '../common'
 import { ChartItem, explorerService } from '../../../services/ExplorerService'
 import { ChartColorConfig } from '../../../constants/common'
-import config from '../../../config'
 
 const useOption = (
   statisticContractResourceDistributed: ChartItem.ContractResourceDistributed[],
@@ -50,7 +49,7 @@ const useOption = (
       position: 'top',
       enterable: true,
       formatter: (params: any) => {
-        return `<a href=https://${config.BASE_URL}/script/${params.value[3]}/${params.value[5]} target=_blank>${
+        return `<a href=${window.location.origin}/script/${params.value[3]}/${params.value[5]} target=_blank>${
           params.value[4] || params.value[3]
         }</a>`
       },