Created
August 9, 2018 21:37
-
-
Save gsidebo/ea013f645e04a25f9e3518751aa99c7a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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