diff --git a/client/src/components/Nav.js b/client/src/components/Nav.js
index c83a761829..71a5f89ead 100644
--- a/client/src/components/Nav.js
+++ b/client/src/components/Nav.js
@@ -19,29 +19,26 @@ import Settings from "settings"
import utils from "utils"
export const AnchorNavItem = ({ to, disabled, children }) => {
+ const { showFloatingMenu, topbarOffset } = useContext(ResponsiveLayoutContext)
const ScrollLinkNavItem = ScrollLink(Nav.Link)
return (
-
- {context => (
- {
- context.showFloatingMenu(false)
- utils.pushHash(to)
- }}
- // TODO: fix the need for offset
- offset={-context.topbarOffset}
- disabled={disabled}
- >
- {children}
-
- )}
-
+ {
+ showFloatingMenu(false)
+ utils.pushHash(to)
+ }}
+ // TODO: fix the need for offset
+ offset={-topbarOffset}
+ disabled={disabled}
+ >
+ {children}
+
)
}
AnchorNavItem.propTypes = {