From fcb5a85cdd21b8a48c16cd02885933bcbdb07ec2 Mon Sep 17 00:00:00 2001
From: Eugen Rochko <eugen@zeonfederated.com>
Date: Tue, 17 Jan 2017 20:09:03 +0100
Subject: Add sounds for notifications. Boop by @jk@mastodon.social

---
 app/assets/javascripts/components/store/configureStore.jsx | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

(limited to 'app/assets/javascripts/components/store/configureStore.jsx')

diff --git a/app/assets/javascripts/components/store/configureStore.jsx b/app/assets/javascripts/components/store/configureStore.jsx
index 87f469999..6f0823bf0 100644
--- a/app/assets/javascripts/components/store/configureStore.jsx
+++ b/app/assets/javascripts/components/store/configureStore.jsx
@@ -3,10 +3,18 @@ import thunk from 'redux-thunk';
 import appReducer from '../reducers';
 import loadingBarMiddleware from '../middleware/loading_bar';
 import errorsMiddleware from '../middleware/errors';
+import soundsMiddleware from 'redux-sounds';
 import Immutable from 'immutable';
 
+const soundsData = {
+  boop: '/sounds/boop.mp3'
+};
+
 export default function configureStore() {
-  return createStore(appReducer, compose(applyMiddleware(thunk, loadingBarMiddleware({
-    promiseTypeSuffixes: ['REQUEST', 'SUCCESS', 'FAIL'],
-  }), errorsMiddleware()), window.devToolsExtension ? window.devToolsExtension() : f => f));
+  return createStore(appReducer, compose(applyMiddleware(
+    thunk,
+    loadingBarMiddleware({ promiseTypeSuffixes: ['REQUEST', 'SUCCESS', 'FAIL'] }),
+    errorsMiddleware(),
+    soundsMiddleware(soundsData)
+  ), window.devToolsExtension ? window.devToolsExtension() : f => f));
 };
-- 
cgit 

