From 8d78e8581c7d24e2c3f4d96c5217914297542b7b Mon Sep 17 00:00:00 2001 From: Ollie H Date: Thu, 4 May 2023 22:25:52 -0700 Subject: Move href back to link (#590) * Move href back to link * Fix cmd/ctrl click on left nav --------- Co-authored-by: Paul Frazee --- src/view/shell/desktop/LeftNav.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/view/shell/desktop/LeftNav.tsx b/src/view/shell/desktop/LeftNav.tsx index 621c7926c..ca6330304 100644 --- a/src/view/shell/desktop/LeftNav.tsx +++ b/src/view/shell/desktop/LeftNav.tsx @@ -99,6 +99,9 @@ const NavItem = observer( const {onPress} = useLinkProps({to: href}) const onPressWrapped = React.useCallback( (e: React.MouseEvent) => { + if (e.ctrlKey || e.metaKey || e.altKey) { + return + } e.preventDefault() if (isCurrent) { store.emitScreenSoftReset() @@ -114,6 +117,9 @@ const NavItem = observer( style={styles.navItemWrapper} hoverStyle={pal.viewLight} onPress={onPressWrapped} + // @ts-ignore web only -prf + href={href} + dataSet={{noUnderline: 1}} accessibilityRole="tab" accessibilityLabel={label} accessibilityHint=""> @@ -125,11 +131,7 @@ const NavItem = observer( ) : null} - + {label} -- cgit 1.4.1