diff --git a/themes/game/components/GameListRecent.js b/themes/game/components/GameListRecent.js index f390adc2666..dd4840c40bb 100644 --- a/themes/game/components/GameListRecent.js +++ b/themes/game/components/GameListRecent.js @@ -1,6 +1,7 @@ /* eslint-disable @next/next/no-img-element */ import { siteConfig } from '@/lib/config' import { checkContainHttp, deepClone, sliceUrlFromHttp } from '@/lib/utils' +import Link from 'next/link' import { useState } from 'react' import { useGameGlobal } from '..' @@ -50,12 +51,14 @@ export const GameListRecent = ({ maxCount = 14 }) => { const GameItem = ({ item }) => { const { title } = item || {} const [showType, setShowType] = useState('img') // img or video - const url = checkContainHttp(item.slug) ? sliceUrlFromHttp(item.slug) : `${siteConfig('SUB_PATH', '')}/${item.slug}` + const url = checkContainHttp(item.slug) + ? sliceUrlFromHttp(item.slug) + : `${siteConfig('SUB_PATH', '')}/${item.slug}` const img = item?.pageCoverThumbnail const video = item?.ext?.video return ( - { setShowType('video') @@ -69,13 +72,19 @@ const GameItem = ({ item }) => {
-
{title}
+
+ {title} +
{showType === 'video' && ( -
+ ) }