diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-06-02 15:01:04 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-02 15:01:04 -0500 |
commit | e8843ded5bf1f3d97b735ffe8f8553de46f9b18b (patch) | |
tree | 9c94613890fdc5428875dede148a5dd48e1c21a3 /src/view/shell/desktop/LeftNav.tsx | |
parent | 46c9de7c1865a57d2fef926db2d923a8687eca18 (diff) | |
download | voidsky-e8843ded5bf1f3d97b735ffe8f8553de46f9b18b.tar.zst |
Fix a bunch of type errors and add a type-check to the github workflows (#837)
* Add yarn type-check * Rename to yarn typecheck * Fix a collection of type errors * Add typecheck to automated tests * add `dist` to exluded folders tsconfig --------- Co-authored-by: Ansh Nanda <anshnanda10@gmail.com>
Diffstat (limited to 'src/view/shell/desktop/LeftNav.tsx')
-rw-r--r-- | src/view/shell/desktop/LeftNav.tsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/view/shell/desktop/LeftNav.tsx b/src/view/shell/desktop/LeftNav.tsx index 8c701ea4e..9f047418b 100644 --- a/src/view/shell/desktop/LeftNav.tsx +++ b/src/view/shell/desktop/LeftNav.tsx @@ -34,7 +34,7 @@ import { SatelliteDishIconSolid, } from 'lib/icons' import {getCurrentRoute, isTab, isStateAtTabRoot} from 'lib/routes/helpers' -import {NavigationProp} from 'lib/routes/types' +import {NavigationProp, CommonNavigatorParams} from 'lib/routes/types' import {router} from '../../../routes' const ProfileCard = observer(() => { @@ -100,7 +100,8 @@ const NavItem = observer( let isCurrent = currentRouteInfo.name === 'Profile' ? isTab(currentRouteInfo.name, pathName) && - currentRouteInfo.params.name === store.me.handle + (currentRouteInfo.params as CommonNavigatorParams['Profile']).name === + store.me.handle : isTab(currentRouteInfo.name, pathName) const {onPress} = useLinkProps({to: href}) const onPressWrapped = React.useCallback( @@ -122,6 +123,7 @@ const NavItem = observer( <PressableWithHover style={styles.navItemWrapper} hoverStyle={pal.viewLight} + // @ts-ignore the function signature differs on web -prf onPress={onPressWrapped} // @ts-ignore web only -prf href={href} |