summaryrefslogtreecommitdiff
path: root/animism-align/frontend/app/views/viewer/viewer.actions.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-10-20 20:05:34 +0200
committerJules Laplace <julescarbon@gmail.com>2020-10-20 20:05:34 +0200
commitd79bc38bc066b9314d347ac683e1df7a74371472 (patch)
tree54c2f23a461ced221cc821de6775333cb5294101 /animism-align/frontend/app/views/viewer/viewer.actions.js
parentee512abb9eceb3a0ef69f7dbe47883f03c1c51cc (diff)
close footnotes and subscribe form if opening/closing nav
Diffstat (limited to 'animism-align/frontend/app/views/viewer/viewer.actions.js')
-rw-r--r--animism-align/frontend/app/views/viewer/viewer.actions.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/animism-align/frontend/app/views/viewer/viewer.actions.js b/animism-align/frontend/app/views/viewer/viewer.actions.js
index d5ad61a..f251e08 100644
--- a/animism-align/frontend/app/views/viewer/viewer.actions.js
+++ b/animism-align/frontend/app/views/viewer/viewer.actions.js
@@ -255,6 +255,12 @@ export const toggleComponent = key => dispatch => {
if (key !== "share" && state.share) {
dispatch({ type: types.viewer.toggle_component, key: "share", value: false })
}
+ if (key !== "footnotes" && state.footnotes) {
+ dispatch({ type: types.viewer.toggle_component, key: "footnotes", value: false })
+ }
+ if (key !== "subscribe" && state.subscribe) {
+ dispatch({ type: types.viewer.toggle_component, key: "subscribe", value: false })
+ }
dispatch({ type: types.viewer.toggle_component, key, value: !state[key] })
}