aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modern/src/settings/OptionsLayout/index.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/modern/src/settings/OptionsLayout/index.js b/modern/src/settings/OptionsLayout/index.js
index a3a89f8..c56ebc3 100644
--- a/modern/src/settings/OptionsLayout/index.js
+++ b/modern/src/settings/OptionsLayout/index.js
@@ -52,18 +52,20 @@ const OptionsLayout = ({ children }) => {
const history = useHistory();
const location = useLocation();
const [openDrawer, setOpenDrawer] = useState(false);
- const [OptionsTitle, setOptionsTitle] = useState();
+ const [optionTitle, setOptionTitle] = useState();
const routes = useRoutes();
useEffect(() => {
- routes.find(route => route.href === location.pathname);
- setOptionsTitle(route.name);
+ const activeRoute = routes.find(route => route.href === location.pathname);
+ setOptionTitle(activeRoute.name);
}, [location]);
+ const title = `Options / ${optionTitle}`;
+
return (
<div className={classes.root}>
<Hidden lgUp>
- <NavBar setOpenDrawer={setOpenDrawer} OptionsTitle={OptionsTitle} />
+ <NavBar setOpenDrawer={setOpenDrawer} title={title} />
<Drawer
variant="temporary"
open={openDrawer}