Selaa lähdekoodia

♻️ refactor(supply-chain): replace svg img with component in SupplyChainMap

- import SupplyChainNetwork component
- replace img tag with SupplyChainNetwork component for better maintainability
- remove hardcoded svg path "/supply-chain/SupplyChainNetwork.svg"
yourname 2 kuukautta sitten
vanhempi
sitoutus
2975e96a10

+ 2 - 5
src/client/home/pages/SupplyChainDashboards/components/SupplyChainMap.tsx

@@ -1,6 +1,7 @@
 import React from 'react';
 import BasePointIcon from './icons/BasePointIcon';
 import SupplyChainIcons from './icons/SupplyChainIcons';
+import SupplyChainNetwork from './icons/SupplyChainNetwork';
 import { useSupplyChain } from '../context/SupplyChainContext';
 
 // 定义定位点类型 - 与SupplyChainContext保持一致
@@ -180,11 +181,7 @@ const SupplyChainMap: React.FC<SupplyChainMapProps> = ({
 
         {/* 供应链网络线 */}
         <div className="absolute inset-[19.27%_4.17%_13.01%_27.6%]">
-          <img
-            alt="供应链网络"
-            className="block max-w-none size-full"
-            src="/supply-chain/SupplyChainNetwork.svg"
-          />
+          <SupplyChainNetwork className="block max-w-none size-full" />
         </div>