Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
(res) => {
// console.log(res);
// Refresh the parent component
refreshHandle();
toast.info('Config deleted');
}, (err) => {
// console.log(`Error occurred: ${err}`);
.then(finished => {
// Redirect to login page after logout is success
dispatch(push('/'))
// Notify visitor with toast
toast.info(`You are logged out! See you later`, {
position: 'top-left',
autoClose: 2000,
hideProgressBar: false,
closeOnClick: true,
draggable: false
})
})
.catch(error => {
async function performCopyMoveOperation(params) {
const {srcRemoteName, srcRemotePath, destRemoteName, destRemotePath, Name, IsDir, dropEffect, updateHandler} = params;
if (dropEffect === "move") { /*Default operation without holding alt is copy, named as move in react-dnd*/
// if (component.props.canCopy) {
await performCopyFile(srcRemoteName, srcRemotePath, destRemoteName, destRemotePath, Name, IsDir);
updateHandler();
if (IsDir) {
toast.info(`Directory copying started in background: ${Name}`);
} else {
toast.info(`File copying started in background: ${Name}`);
}
// } else {
// toast.error("This remote does not support copying");
// }
} else {
// if (component.props.canMove) {
await performMoveFile(srcRemoteName, srcRemotePath, destRemoteName, destRemotePath, Name, IsDir);
updateHandler();
if (IsDir) {
toast.info(`Directory moving started in background: ${Name}`);
} else {
toast.info(`Directory moving started in background: ${Name}`);
}
const notify = () =>
toast.info(`You will be notified of upcoming events ${email}`);
afterFetch={({ response }) => {
if (response.ok) {
toast.info("Order cancelled");
}
}}
/>,
componentDidMount() {
toast("Default Notification !");
toast.success("Success Notification !", {
position: toast.POSITION.TOP_CENTER
});
toast.error("Error Notification !", {
position: toast.POSITION.TOP_LEFT
});
toast.warn("Warning Notification !", {
position: toast.POSITION.BOTTOM_LEFT
});
toast.info("Info Notification !", {
position: toast.POSITION.BOTTOM_CENTER
});
toast("Custom Style Notification !", {
position: toast.POSITION.BOTTOM_RIGHT,
className: 'dark-toast',
progressClassName: 'transparent-progress'
});
}
const notify = () => {
toast.info(`You will be notified of upcoming events ${email}`);
};
private deleteProject = async (project: IProject) => {
try {
await this.props.actions.deleteProject(project);
toast.info(interpolate(strings.homePage.messages.deleteSuccess, { project }));
} catch (error) {
throw new AppError(ErrorCode.ProjectDeleteError, "Error deleting project file");
}
}
private handleCopyAddress = () => {
toast.info(this.props.t("main:copied"), {
position: toast.POSITION.BOTTOM_CENTER,
autoClose: 1000,
closeButton: false,
hideProgressBar: true
});
};
}