Skip to content

Instantly share code, notes, and snippets.

@gsidebo
Created August 9, 2018 21:37
Show Gist options
  • Save gsidebo/ea013f645e04a25f9e3518751aa99c7a to your computer and use it in GitHub Desktop.
Save gsidebo/ea013f645e04a25f9e3518751aa99c7a to your computer and use it in GitHub Desktop.
diff --git a/static/js/containers/App.js b/static/js/containers/App.js
index 74e55ec9..db92f30a 100644
--- a/static/js/containers/App.js
+++ b/static/js/containers/App.js
@@ -39,7 +39,8 @@ import {
setShowDrawerDesktop,
showDropdown,
hideDropdown,
- hideBanner
+ hideBanner,
+ setSnackbarMessage
} from "../actions/ui"
import { setChannelData } from "../actions/channel"
import { AUTH_REQUIRED_URL, SETTINGS_URL } from "../lib/url"
@@ -134,6 +135,16 @@ class App extends React.Component<AppProps> {
dispatch(hideBanner())
}
+ snackIt = () => {
+ const { dispatch } = this.props
+ dispatch(
+ setSnackbarMessage({
+ message:
+ "Normal snackbar message"
+ })
+ )
+ }
+
render() {
const {
match,
@@ -166,6 +177,9 @@ class App extends React.Component<AppProps> {
hide={preventDefaultAndInvoke(this.hideBanner)}
/>
<div className="content">
+ <div>
+ <h3><a onClick={this.snackIt} href="#">SNACKBAR</a></h3>
+ </div>
<Route exact path={match.url} component={HomePage} />
<Route
path={`${match.url}moderation/c/:channelName`}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment