import React, { useEffect } from "react"; import styles from "./MenuBottomMobile.css"; import userIcon from "../assets/userIcon.svg"; import GET_SESSION from "../../../graphql/query/GET_SESSION.graphql"; import { useLazyQuery } from "react-apollo"; import { Spinner } from "vtex.styleguide"; import { Link } from "vtex.render-runtime"; const MenuBottomMobile = () => { const [getSession, { data, loading }] = useLazyQuery( GET_SESSION, { fetchPolicy: "network-only", } ); useEffect(() => { getSession(); }, []); if (!data || loading) { return (
); } if (data.getSession.profile === null) { return (
User Icon Entrar
); } return (
User Icon Minha Conta Meus Pedidos
); }; export { MenuBottomMobile };