Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 4x 8x 8x | import { Menu, MenuItem } from '@material-ui/core'; import React, { useContext } from 'react'; import { CASContext } from '../contexts/CASProvider'; interface ProfileProps { anchorEl: HTMLElement | null; handleClose: () => void; } export const Profile = ({ anchorEl, handleClose }: ProfileProps) => { const { logout } = useContext(CASContext)!; return ( <Menu anchorEl={anchorEl} keepMounted open={Boolean(anchorEl)} onClose={handleClose}> {/* <MenuItem>Profil</MenuItem> */} <MenuItem onClick={logout}>Wyloguj</MenuItem> </Menu> ); }; |