import toast from 'react-hot-toast' ; export default function promiseToast ( fetchPromise ) { toast . promise ( fetchPromise , { loading : 'Loading' , success : 'Updated' , error : ( err ) => err . toString ( ) , } , { error : { duration : 5000 } } ) ; }