From e481356af482ffea47057ef0eec280a22f855a31 Mon Sep 17 00:00:00 2001 From: Paul Bienkowski Date: Tue, 30 Nov 2021 19:53:52 +0100 Subject: [PATCH] fix: menu items navigate with JS, not with links --- frontend/src/App.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/src/App.js b/frontend/src/App.js index 5158b81..a2f8367 100644 --- a/frontend/src/App.js +++ b/frontend/src/App.js @@ -28,10 +28,16 @@ import api from 'api' // which is a workaround for an annoying warning that is somehow caused by the // and combination. function MenuItemForLink({navigate, ...props}) { - return + return { + e.preventDefault() + navigate() + }} /> } function DropdownItemForLink({navigate, ...props}) { - return + return { + e.preventDefault() + navigate() + }} /> } const App = connect((state) => ({login: state.login}))(function App({login}) {