import React from "react";
import { useSelector } from 'react-redux';
import Box from '@mui/material/Box';
import store from '../redux/reducers';

const DrawUserName = () => {
  const token = useSelector(state => state.auth.token);

  return (
    <>
      {token ? <Box>Hello, {store.getState().auth?.payload?.sub?.login}</Box> : <></>}
    </>

  )
}
export default DrawUserName;