From e6f906dbb565abdb29297ec67db3c922135c628c Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 2 Sep 2021 23:20:12 -0700 Subject: Migrate components --- modern/src/MainToolbar.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'modern/src/MainToolbar.js') diff --git a/modern/src/MainToolbar.js b/modern/src/MainToolbar.js index 65b02f51..1e4dabe4 100644 --- a/modern/src/MainToolbar.js +++ b/modern/src/MainToolbar.js @@ -18,8 +18,8 @@ import PersonIcon from '@material-ui/icons/Person'; import DescriptionIcon from '@material-ui/icons/Description'; import ReplayIcon from '@material-ui/icons/Replay'; import { sessionActions } from './store'; -import t from './LocalizationProvider'; import * as selectors from './common/selectors'; +import { useTranslation } from './LocalizationProvider'; const useStyles = makeStyles((theme) => ({ flex: { @@ -38,12 +38,15 @@ const useStyles = makeStyles((theme) => ({ })); const MainToolbar = () => { - const dispatch = useDispatch(); - const [drawer, setDrawer] = useState(false); const classes = useStyles(); const history = useHistory(); + const dispatch = useDispatch(); + const t = useTranslation(); + const userId = useSelector(selectors.getUserId); + const [drawer, setDrawer] = useState(false); + const openDrawer = () => { setDrawer(true); }; const closeDrawer = () => { setDrawer(false); }; -- cgit v1.2.3