mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-02 11:15:35 +03:00
changed actionModal params to options object
This commit is contained in:
parent
93546c8d55
commit
3aa9fec9a6
@ -23,17 +23,11 @@ export const toastNotification = (payload:string) => ({
|
||||
type: TOAST_NOTIFICATION,
|
||||
});
|
||||
|
||||
export const showActionModal = (title:string, body?:string, para?: string, buttons?:AlertButton[], headerContent?:any, headerImage?:any, onClosed?:()=>void) => ({
|
||||
export const showActionModal = (payload:any) => ({
|
||||
payload: {
|
||||
actionModalVisible: new Date().getTime(),
|
||||
actionModalData: {
|
||||
title,
|
||||
body,
|
||||
para,
|
||||
buttons,
|
||||
headerContent,
|
||||
headerImage,
|
||||
onClosed,
|
||||
...payload
|
||||
},
|
||||
},
|
||||
type: SHOW_ACTION_MODAL,
|
||||
|
@ -189,9 +189,9 @@ class DelegateScreen extends Component {
|
||||
} else {
|
||||
// this.amountTextInput.current.blur();
|
||||
dispatch(
|
||||
showActionModal(
|
||||
intl.formatMessage({ id: 'transfer.confirm' }),
|
||||
intl.formatMessage(
|
||||
showActionModal({
|
||||
title: intl.formatMessage({ id: 'transfer.confirm' }),
|
||||
body: intl.formatMessage(
|
||||
{ id: 'transfer.confirm_summary' },
|
||||
{
|
||||
hp: hp,
|
||||
@ -200,13 +200,13 @@ class DelegateScreen extends Component {
|
||||
delegator: destination,
|
||||
},
|
||||
),
|
||||
intl.formatMessage(
|
||||
para: intl.formatMessage(
|
||||
{ id: 'transfer.confirm_summary_para' },
|
||||
{
|
||||
prev: delegatedHP,
|
||||
},
|
||||
),
|
||||
[
|
||||
buttons: [
|
||||
{
|
||||
text: intl.formatMessage({ id: 'alert.cancel' }),
|
||||
onPress: () => console.log('Cancel'),
|
||||
@ -216,8 +216,8 @@ class DelegateScreen extends Component {
|
||||
onPress: () => this._handleTransferAction(),
|
||||
},
|
||||
],
|
||||
this._renderToFromAvatars(),
|
||||
),
|
||||
headerContent: this._renderToFromAvatars(),
|
||||
}),
|
||||
);
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user