import React from "react";
import GameList from "@components/GameList";
import {useThemeProvider} from "@contexts/themeContext";
import {useDispatch, useSelector} from "react-redux";
import {getGameListStatus} from "@features/gameListSlice";
import {reqGameList} from "@features/api";
import {getUserInfo} from "@features/mainSlice";

const ModuleGameList=({data})=>{
    const {isMobile} = useThemeProvider();
    const dispatch = useDispatch();
    const status=useSelector(getGameListStatus(data._mkey));
    const user=useSelector(getUserInfo);
    const reqMore=(id,tabtype,page)=>{
        dispatch(reqGameList({mkey:data._mkey,id,tabtype,page}));
    }
    return (
        <div className={``}>
            <GameList data={data} status={status} reqMore={reqMore} user={user}>

            </GameList>
        </div>
    )
}
export default ModuleGameList;
