瀏覽代碼

fix: add asset prefix host

hi-cactus! 3 年之前
父節點
當前提交
1d23b614d2
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      app/containers/Display/components/Container/Slide/Content.tsx

+ 2 - 1
app/containers/Display/components/Container/Slide/Content.tsx

@@ -22,6 +22,7 @@ import React, { useContext, useMemo, PropsWithChildren } from 'react'
 
 import { ContainerContext } from '../ContainerContext'
 import { SlideContext } from './SlideContext'
+import { ASSETS_HOST } from 'app/globalConstants'
 
 const SlideContent: React.RefForwardingComponent<
   HTMLDivElement,
@@ -49,7 +50,7 @@ const SlideContent: React.RefForwardingComponent<
       backgroundStyle.backgroundColor = `rgba(${rgb})`
     }
     if (backgroundImage) {
-      backgroundStyle.backgroundImage = `url("${backgroundImage}")`
+      backgroundStyle.backgroundImage = `url("${ASSETS_HOST}${backgroundImage}")`
     }
     // to adjust full screen style in mobile
     const setStyleToBody =