import React from "react"; import { useAuth } from "../../hooks"; import { Row, Card, List } from "antd"; import { useHistory } from "react-router-dom"; import { ViewLoading } from "../../components"; import { DefaultLayout } from "../../components/layouts"; const Inicio = () => { const history = useHistory(); const { user } = useAuth(); const cardsAdmin = [ { id: 0, titulo: "Eventos", img: "/assets/eventos.png", path: "/administracion/eventos", }, { id: 1, titulo: "Usuarios", img: "/assets/usuarios.png", path: "/administracion/usuarios", }, { id: 2, titulo: "Grupos", img: "/assets/grupos.png", path: "/administracion/grupos", }, { id: 3, titulo: "Reportes", img: "/assets/reportes.png", path: "/administracion/reportes", }, ]; const cardsCliente = [ { id: 0, titulo: "Editar perfil", img: "/assets/profile.png", path: "/perfil", }, ]; const ViewAdmin = () => { return ( ( history.push(item.path) } title={item.titulo} style={{ textAlign: "center", cursor: 'pointer' }} > {item.titulo} )} /> ); }; const ViewCliente = () => { return ( ( history.push(item.path) } title={item.titulo} style={{ textAlign: "center", cursor: 'pointer' }} > {item.titulo} )} /> ); }; if (!user) return ; return ( {user?.rol === "admin" ? : } ); }; export default Inicio;