Do not show archived teams when browsing available teams (#7460)

This commit is contained in:
Elias Nahum
2023-07-19 08:17:18 -04:00
committed by GitHub
parent 21fc831554
commit 47317bb1e9
3 changed files with 9 additions and 11 deletions

View File

@@ -15,15 +15,11 @@ import {DEFAULT_LOCALE, getTranslations} from '@i18n';
const withGestures = (Screen: React.ComponentType, styles: StyleProp<ViewStyle>) => {
return function gestureHoc(props: any) {
if (Platform.OS === 'android') {
return (
<GestureHandlerRootView style={[{flex: 1}, styles]}>
<Screen {...props}/>
</GestureHandlerRootView>
);
}
return <Screen {...props}/>;
return (
<GestureHandlerRootView style={[{flex: 1}, styles]}>
<Screen {...props}/>
</GestureHandlerRootView>
);
};
};

View File

@@ -79,7 +79,8 @@ export default function JoinTeam({
page.current = resp.page;
hasMore.current = resp.hasMore;
if (resp.teams.length && mounted.current) {
setOtherTeams((cur) => [...cur, ...resp.teams]);
const teams = resp.teams.filter((t) => t.delete_at === 0);
setOtherTeams((cur) => [...cur, ...teams]);
}
setLoading(false);
}, [joinedIds, serverUrl]);

View File

@@ -70,7 +70,8 @@ const SelectTeam = ({
page.current = resp.page;
hasMore.current = resp.hasMore;
if (resp.teams.length && mounted.current) {
setOtherTeams((cur) => [...cur, ...resp.teams]);
const teams = resp.teams.filter((t) => t.delete_at === 0);
setOtherTeams((cur) => [...cur, ...teams]);
}
setLoading(false);
}, [serverUrl]);