diff --git a/themes/game/components/GameListIndexCombine.js b/themes/game/components/GameListIndexCombine.js index 681efd27..ac8b14ba 100644 --- a/themes/game/components/GameListIndexCombine.js +++ b/themes/game/components/GameListIndexCombine.js @@ -2,7 +2,7 @@ import { AdSlot } from '@/components/GoogleAdsense' import LazyImage from '@/components/LazyImage' import { siteConfig } from '@/lib/config' -import { checkContainHttp, deepClone, sliceUrlFromHttp } from '@/lib/utils' +import { deepClone } from '@/lib/utils' import Link from 'next/link' import { useState } from 'react' import CONFIG from '../config' @@ -139,14 +139,12 @@ const GameItem = ({ item, isLargeCard }) => { const { title } = item const img = item.pageCoverThumbnail const [showType, setShowType] = useState('img') // img or video - const url = checkContainHttp(item.slug) - ? sliceUrlFromHttp(item.slug) - : `${siteConfig('SUB_PATH', '')}/${item.slug}` + const video = item?.ext?.video return ( { diff --git a/themes/game/components/GameListNormal.js b/themes/game/components/GameListNormal.js index b9bc9603..22fc4a6f 100644 --- a/themes/game/components/GameListNormal.js +++ b/themes/game/components/GameListNormal.js @@ -1,6 +1,5 @@ /* eslint-disable @next/next/no-img-element */ -import { siteConfig } from '@/lib/config' -import { checkContainHttp, deepClone, sliceUrlFromHttp } from '@/lib/utils' +import { deepClone } from '@/lib/utils' import Link from 'next/link' import { useState } from 'react' @@ -43,12 +42,11 @@ const GameItem = ({ item }) => { const { title } = item const img = item.pageCoverThumbnail const [showType, setShowType] = useState('img') // img or video - const url = checkContainHttp(item.slug) ? sliceUrlFromHttp(item.slug) : `${siteConfig('SUB_PATH', '')}/${item.slug}` const video = item?.ext?.video return ( { setShowType('video') }} @@ -58,17 +56,27 @@ const GameItem = ({ item }) => { title={title} className={`card-single h-28 w-28 relative shadow rounded-md overflow-hidden flex justify-center items-center group hover:border-purple-400`}> -