|
@@ -5,6 +5,7 @@ import symbol from "@assets/symbol-defs.svg";
|
|
|
import {LazyLoadImage} from "react-lazy-load-image-component";
|
|
import {LazyLoadImage} from "react-lazy-load-image-component";
|
|
|
import {useThemeProvider} from "@contexts/themeContext";
|
|
import {useThemeProvider} from "@contexts/themeContext";
|
|
|
import GameItem from "@components/GameItem";
|
|
import GameItem from "@components/GameItem";
|
|
|
|
|
+import SvgIcon from "@components/SvgIcon";
|
|
|
|
|
|
|
|
const i18n=global.i18n;
|
|
const i18n=global.i18n;
|
|
|
const GameSmallList=({data})=>{
|
|
const GameSmallList=({data})=>{
|
|
@@ -131,6 +132,7 @@ const GameSmallList=({data})=>{
|
|
|
return (
|
|
return (
|
|
|
<div className={styles.grid_top}>
|
|
<div className={styles.grid_top}>
|
|
|
<div className={styles.grid_tit}>
|
|
<div className={styles.grid_tit}>
|
|
|
|
|
+ <SvgIcon herf={data.icon}></SvgIcon>
|
|
|
<span>{data.title}</span>
|
|
<span>{data.title}</span>
|
|
|
</div>
|
|
</div>
|
|
|
<div className={styles.grid_nav}>
|
|
<div className={styles.grid_nav}>
|
|
@@ -144,7 +146,7 @@ const GameSmallList=({data})=>{
|
|
|
</div>
|
|
</div>
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
- const renderList=()=>{
|
|
|
|
|
|
|
+ const renderDeskList=()=>{
|
|
|
return (
|
|
return (
|
|
|
<div className={styles.grid_list} ref={gridListRef}>
|
|
<div className={styles.grid_list} ref={gridListRef}>
|
|
|
{
|
|
{
|
|
@@ -157,6 +159,23 @@ const GameSmallList=({data})=>{
|
|
|
</div>
|
|
</div>
|
|
|
)
|
|
)
|
|
|
}
|
|
}
|
|
|
|
|
+ const renderMobileList=()=>{
|
|
|
|
|
+ return (
|
|
|
|
|
+ <div className={styles.grid_list_m} ref={gridListRef}>
|
|
|
|
|
+ {
|
|
|
|
|
+ list.map((item,index)=>{
|
|
|
|
|
+ return (
|
|
|
|
|
+ <GameItem key={index} data={item}></GameItem>
|
|
|
|
|
+ )
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ </div>
|
|
|
|
|
+ )
|
|
|
|
|
+ }
|
|
|
|
|
+ const renderList=()=>{
|
|
|
|
|
+ if (isMobile())return renderMobileList();
|
|
|
|
|
+ else return renderDeskList();
|
|
|
|
|
+ }
|
|
|
return (
|
|
return (
|
|
|
<div className={`w-100 ${styles.list_container}`}>
|
|
<div className={`w-100 ${styles.list_container}`}>
|
|
|
{renderTop()}
|
|
{renderTop()}
|