Advertisement
Guest User

Untitled

a guest
Oct 20th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. const renderActionLink = (label, url) => (
  2. <a href={url} >{label}</a>
  3. )
  4.  
  5. componentDidMount() {
  6. Eventer.on('toastFetched', this.handleToast)
  7. }
  8.  
  9. handleToast = ({ message = '', action: { label, url } = {} }) => {
  10. const params = label? {closeButton: renderActionLink(label,url)}: undefined;
  11. showToast(toast, params)
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement