update: type for `showActionSheet`

This commit is contained in:
Gerzon Z 2022-04-26 17:51:41 -04:00
parent 4148ec554c
commit f40847bc92
4 changed files with 5 additions and 7 deletions

View File

@ -6,8 +6,8 @@ export type TActionSheetOptionsItem = { title: string; icon: string; onPress: ()
export type TActionSheetOptions = {
options: TActionSheetOptionsItem[];
headerHeight: number;
customHeader: React.ReactElement | null;
headerHeight?: number;
customHeader?: React.ReactElement | null;
hasCancel?: boolean;
};
interface IActionSheetProvider {

View File

@ -243,7 +243,6 @@
"Forgot_password": "Forgot your password?",
"Forgot_Password": "Forgot Password",
"Forward": "Forward",
"Forward_chat": "Forward chat",
"Forward_Chat": "Forward Chat",
"Forward_to_department": "Forward to department",
"Forward_to_user": "Forward to user",

View File

@ -1321,8 +1321,7 @@ const mapStateToProps = (state: IApplicationState) => ({
viewBroadcastMemberListPermission: state.permissions['view-broadcast-member-list'],
createTeamPermission: state.permissions['create-team'],
addTeamChannelPermission: state.permissions['add-team-channel'],
convertTeamPermission: state.permissions['convert-team'],
livechatAllowManualOnHold: state.settings.Livechat_allow_manual_on_hold as boolean
convertTeamPermission: state.permissions['convert-team']
});
export default connect(mapStateToProps)(withTheme(withDimensions(RoomActionsView)));

View File

@ -12,7 +12,7 @@ import { events, logEvent } from '../../utils/log';
import { isTeamRoom } from '../../utils/room';
import { IApplicationState, SubscriptionType, TMessageModel, TSubscriptionModel } from '../../definitions';
import { ChatsStackParamList } from '../../stacks/types';
import { withActionSheet } from '../../containers/ActionSheet';
import { TActionSheetOptions, withActionSheet } from '../../containers/ActionSheet';
import i18n from '../../i18n';
import { showConfirmationAlert, showErrorAlert } from '../../utils/info';
import { closeRoom } from '../../actions/room';
@ -31,7 +31,7 @@ interface IRightButtonsProps {
status?: string;
dispatch: Dispatch;
encrypted?: boolean;
showActionSheet: Function; // TODO: Change to proper type
showActionSheet: (item: TActionSheetOptions) => void;
transferLivechatGuestPermission: boolean;
navigation: StackNavigationProp<ChatsStackParamList, 'RoomView'>;
omnichannelPermissions: {