Conversation
594500d to
135d84e
Compare
3b3daf7 to
9308a57
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 193 out of 195 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| function safeNavigateAppend( | ||
| path: NoParamRouteKeys | AllOptionalParamRouteKeys | {name: ParamRouteKeys; params: object | undefined}, | ||
| replace?: boolean | ||
| ) { | ||
| return isFocused && navigateAppend(path as never, replace) | ||
| } |
There was a problem hiding this comment.
safeNavigateAppend overload signatures declare a void return, but the implementation currently returns isFocused && navigateAppend(...), which evaluates to false | undefined (and makes the implementation signature incompatible with the overloads). This will either fail type-checking or encourage callers to rely on a boolean return that isn’t part of the public contract. Prefer an explicit if (!isFocused) return; navigateAppend(...) (or explicitly return void).
| @@ -56,33 +70,34 @@ const Connected = () => { | |||
| newTeamRequests, | |||
| newTeams, | |||
| teamIDToResetUsers, | |||
| teamListFilter, | |||
| teamListSort, | |||
| teamMeta, | |||
| } | |||
| }) | |||
| ) | |||
| const {activityLevels, deletedTeams, newTeamRequests, newTeams} = data | |||
| const {teamIDToResetUsers, teamListFilter: filter, teamListSort: sortOrder, teamMeta: _teams} = data | |||
| const {teamIDToResetUsers, teamMeta: _teams} = data | |||
| const {getTeams, launchNewTeamWizardOrModal} = data | |||
|
|
|||
| const teams = orderTeams(_teams, newTeamRequests, teamIDToResetUsers, newTeams, sortOrder, activityLevels, filter) | |||
| const teams = orderTeams(_teams, newTeamRequests, teamIDToResetUsers, newTeams, sort, activityLevels, filter) | |||
|
|
|||
| // subscribe to teams changes | |||
There was a problem hiding this comment.
Connected now takes {filter, sort} props with defaults, but as a React Navigation screen it will receive {route, navigation} props instead. As a result, route params updates from navigation.setParams({filter, sort}) won’t be read here and sorting/filtering will never change from the defaults. Read filter/sort from route.params (and type the component as a screen with route), rather than from regular props.
No description provided.