Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
const linkID = await saveFirestore(userID, this.state.item, items);
if (!linkID) {
Alert.alert('保存に失敗しました');
return;
}
const shareHost = 'https://peperomia.info';
console.log(`${shareHost}/${linkID}`);
Clipboard.setString(`${shareHost}/${linkID}`);
const { height } = Dimensions.get('window');
const toast = Toast.show('リンクがコピーされました!', {
duration: Toast.durations.LONG,
position: height - 150,
shadow: true,
animation: true,
hideOnPress: true,
delay: 0,
});
// You can manually hide the Toast, or it will automatically disappear after a `duration` ms timeout.
setTimeout(function() {
Toast.hide(toast);
}, 3000);
};
onCloseShareLink = async (doc: string) => {
const result = await updateShare(doc, false);
if (result) {
const { height } = Dimensions.get('window');
let toast = Toast.show('リンクを非公開にしました', {
duration: Toast.durations.LONG,
//textColor: "red",
position: height - 150,
shadow: true,
animation: true,
hideOnPress: true,
delay: 0,
});
// You can manually hide the Toast, or it will automatically disappear after a `duration` ms timeout.
setTimeout(function() {
Toast.hide(toast);
}, 3000);
}
};
.catch(() => {
Toast.show(i18n.t('IMToastError', {
action: i18n.t('IMSettingGroupNameChange'),
}));
});
}
dao.fetchLocalData(date).then((localData) => {
Toast.show('已是最新数据了', {position: px2dp(-80)});
dispatch(receiveData(localData, date));
}, (localData)=>{
fetchWithTimeout(5000, fetch(url))
.then(() => {
if (isCurrent) {
this._markAllRead();
} else {
Toast.show(i18n.t('IMToastSuccess', {
action: i18n.t('IMCommonSendMessage')
}));
}
})
.catch(() => {
onPasswordSet={( newPassword ) => {
if ( newPassword === this.state.oldPassword ) {
this._passwordInputPageItem1.blur();
this._passwordInputPageItem2.blur();
this.setPassword( newPassword );
} else {
Toast.show( I18n.t( 'Password Invalid' ), { position: Toast.positions.CENTER } );
this._passwordInputPageItem1.clearPassword();
this._passwordInputPageItem2.clearPassword();
this._passwordInputPageItem2.blur();
this._passwordInputPageItem1.focus();
this.setState( {
oldPassword: ''
} );
this._viewPager.setPage( 0 )
}
}}
/>
InteractionManager.runAfterInteractions(() => {
const {addressReducer} = this.props;
if (addressReducer.isToasting) {
Toast.show(addressReducer.message, {position:Toast.positions.CENTER});
}
});
}
export default function ClaimRewardsReducer (state = initState, action) {
switch (action.type) {
case "CLAIM_ONGOING_REDUCER":
return Object.assign({}, state, {
"isClaiming": true
});
case "CLAIM_SUCCESS_REDUCER":
Toast.show('Claim Success',{
position: 36,
});
return Object.assign({}, state, {
"isClaiming": false
});
case "CLAIM_FAIL_REDUCER":
Toast.show('Claim Failed',{
position: 36,
});
return Object.assign({}, state, {
"isClaiming": false
});
default:
return state;
}
props: Typings.Action.Setting.Params,
text: string,
isOwner: boolean
): Promise {
const {imId, navigation} = props;
try {
if (isOwner) {
await Delegate.model.Group.destroyOne(imId);
} else {
await Delegate.model.Group.quitOne(imId);
}
Toast.show(i18n.t('IMToastSuccess', {action: text}));
const action = StackActions.pop({n: 2});
navigation.dispatch(action);
} catch (err) {
Toast.show(i18n.t('IMToastError', {action: text}));
}
}
setPassword( password ) {
if ( password.length !== 6 ) {
Toast.show( "Password length is not correctly" );
return;
}
setStorageAESKey( password );
storage.save( {
key: 'PasswordInputPage',
data: encryptObjectToString( {
passwordCheck: "passwordCheck",
} ),
} ).then( () => {
setIsSetLocalStorageAESKey( true );
this.props.navigation.goBack();
Toast.show( I18n.t( "Password Set Success" ) );