aboutsummaryrefslogtreecommitdiff
path: root/modern/src/MainToolbar.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-09-02 23:20:12 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2021-09-02 23:20:12 -0700
commite6f906dbb565abdb29297ec67db3c922135c628c (patch)
treea6d1c89436d066ec9171b6a68e8d5e7eeb56d2de /modern/src/MainToolbar.js
parente5f07d30df69c1fff28cf1ff8502e4843a8b543c (diff)
downloadtrackermap-web-e6f906dbb565abdb29297ec67db3c922135c628c.tar.gz
trackermap-web-e6f906dbb565abdb29297ec67db3c922135c628c.tar.bz2
trackermap-web-e6f906dbb565abdb29297ec67db3c922135c628c.zip
Migrate components
Diffstat (limited to 'modern/src/MainToolbar.js')
-rw-r--r--modern/src/MainToolbar.js9
1 files changed, 6 insertions, 3 deletions
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); };