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>
This commit is contained in:
parent
46c9de7c18
commit
e8843ded5b
23 changed files with 168 additions and 82 deletions
|
@ -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}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue