* update js dependencies * update react-native libraries * update watermelonDB * update RN to 0.72.7 * update fastlane * fix remove_markdown/at_mention import * update mattermost libraries * update fastlane deps * remove haptic-feedback patch * update okhttp to 4.12.0 and patch netinfo to accurately identify VPN connections * create ImaegStyles intersection type
24 lines
923 B
TypeScript
24 lines
923 B
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import {withObservables} from '@nozbe/watermelondb/react';
|
|
|
|
import {withServerUrl} from '@context/server';
|
|
import EphemeralStore from '@store/ephemeral_store';
|
|
|
|
import TeamSidebar from './team_sidebar';
|
|
|
|
const enhanced = withObservables([], ({serverUrl}: {serverUrl: string}) => {
|
|
// TODO https://mattermost.atlassian.net/browse/MM-43622
|
|
// const canCreateTeams = observeCurrentUser(database).pipe(
|
|
// switchMap((u) => (u ? of$(u.roles.split(' ')) : of$([]))),
|
|
// switchMap((values) => queryRolesByNames(database, values).observe()),
|
|
// switchMap((r) => of$(hasPermission(r, Permissions.CREATE_TEAM, false))),
|
|
// );
|
|
|
|
return {
|
|
canJoinOtherTeams: EphemeralStore.observeCanJoinOtherTeams(serverUrl),
|
|
};
|
|
});
|
|
|
|
export default withServerUrl(enhanced(TeamSidebar));
|