diff --git a/components/Editor.js b/components/Editor.js index 357657d..17dfd98 100644 --- a/components/Editor.js +++ b/components/Editor.js @@ -298,7 +298,7 @@ class Editor extends React.Component { this.context.snippet.update(this.props.snippet.id, this.state).then(() => this.props.setToasts({ type: 'SET', - toast: [{ children: 'Snippet saved', timeout: 3000 }], + toasts: [{ children: 'Snippet saved', timeout: 3000 }], }) ) diff --git a/components/Toasts.js b/components/Toasts.js index 657f90d..d44a4d7 100644 --- a/components/Toasts.js +++ b/components/Toasts.js @@ -94,11 +94,11 @@ function ToastContainer(props) { return (
{props.toasts - .slice() - .reverse() - .map(toast => ( - - ))} + ? props.toasts + .slice() + .reverse() + .map(toast => ) + : null}