Chore: Evaluate AddExistingChannelView - TypeScript (#4169)

This commit is contained in:
Reinaldo Neto 2022-05-11 14:38:49 -03:00 committed by GitHub
parent fb11932d0b
commit 59be3b68b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@ import { goRoom } from '../utils/goRoom';
import { showErrorAlert } from '../utils/info'; import { showErrorAlert } from '../utils/info';
import debounce from '../utils/debounce'; import debounce from '../utils/debounce';
import { ChatsStackParamList } from '../stacks/types'; import { ChatsStackParamList } from '../stacks/types';
import { TSubscriptionModel, SubscriptionType } from '../definitions'; import { TSubscriptionModel, SubscriptionType, IApplicationState } from '../definitions';
import { getRoomTitle, hasPermission } from '../lib/methods'; import { getRoomTitle, hasPermission } from '../lib/methods';
import { Services } from '../lib/services'; import { Services } from '../lib/services';
@ -37,7 +37,7 @@ interface IAddExistingChannelViewProps {
route: RouteProp<ChatsStackParamList, 'AddExistingChannelView'>; route: RouteProp<ChatsStackParamList, 'AddExistingChannelView'>;
theme: TSupportedThemes; theme: TSupportedThemes;
isMasterDetail: boolean; isMasterDetail: boolean;
addTeamChannelPermission: string[]; addTeamChannelPermission?: string[];
} }
const QUERY_SIZE = 50; const QUERY_SIZE = 50;
@ -222,7 +222,7 @@ class AddExistingChannelView extends React.Component<IAddExistingChannelViewProp
} }
} }
const mapStateToProps = (state: any) => ({ const mapStateToProps = (state: IApplicationState) => ({
isMasterDetail: state.app.isMasterDetail, isMasterDetail: state.app.isMasterDetail,
addTeamChannelPermission: state.permissions['add-team-channel'] addTeamChannelPermission: state.permissions['add-team-channel']
}); });