Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix: do not show nav menu button when canGoBack=true

thecodrrf0c2f4b793ea
diff --git a/apps/web/src/components/route-container/index.js b/apps/web/src/components/route-container/index.js
index a5908030d..1fee4d8fb 100644
--- a/apps/web/src/components/route-container/index.js
+++ b/apps/web/src/components/route-container/index.js
@@ -48,7 +48,7 @@ function Header(props) {
<Flex mx={2} flexDirection="column">
<Flex alignItems="center" justifyContent="space-between">
<Flex alignItems="center" py={2}>
- {(canGoBack || onlyBackButton) && (
+ {canGoBack || onlyBackButton ? (
<Box
onClick={() => window.history.back()}
ml={-2}
@@ -57,16 +57,17 @@ function Header(props) {
>
<Icon.ChevronLeft size={38} color="fontPrimary" />
</Box>
+ ) : (
+ <Icon.Menu
+ onClick={toggleSideMenu}
+ sx={{
+ ml: 0,
+ mr: 4,
+ display: [onlyBackButton ? "none" : "block", "none", "none"],
+ }}
+ size={28}
+ />
)}
- <Icon.Menu
- onClick={toggleSideMenu}
- sx={{
- ml: 0,
- mr: 4,
- display: [onlyBackButton ? "none" : "block", "none", "none"],
- }}
- size={28}
- />
<Heading fontSize="heading" color={"text"}>
{title}
</Heading>