import { Menu, MenuItem } from "@material-ui/core"; import React, { FC } from "react"; import BusinessLogicContext from "../../buisnesslogic/BusinessLogicContext"; import { BuisnessProvided } from "../../buisnesslogic/BuisnessLogicProvider"; interface ProfileProps { anchorEl: HTMLElement | null; handleClose: () => void; } export const Profile: FC = ({ anchorEl, handleClose, ...restProps }) => { return ( Profile My account {(context) => ( { (context as BuisnessProvided).reducers(); }} > Logout )} ); };