about summary refs log tree commit diff
path: root/app/javascript/glitch/components/compose/advanced_options/container.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/javascript/glitch/components/compose/advanced_options/container.js')
-rw-r--r--app/javascript/glitch/components/compose/advanced_options/container.js44
1 files changed, 44 insertions, 0 deletions
diff --git a/app/javascript/glitch/components/compose/advanced_options/container.js b/app/javascript/glitch/components/compose/advanced_options/container.js
index 10804454a..160f22737 100644
--- a/app/javascript/glitch/components/compose/advanced_options/container.js
+++ b/app/javascript/glitch/components/compose/advanced_options/container.js
@@ -1,3 +1,21 @@
+/*
+
+`<ComposeAdvancedOptionsContainer>`
+===================================
+
+This container connects `<ComposeAdvancedOptions>` to the Redux store.
+
+*/
+
+//  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+/*
+
+Imports:
+--------
+
+*/
+
 //  Package imports  //
 import { connect } from 'react-redux';
 
@@ -7,10 +25,36 @@ import { toggleComposeAdvancedOption } from '../../../../mastodon/actions/compos
 //  Our imports  //
 import ComposeAdvancedOptions from '.';
 
+//  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+/*
+
+State mapping:
+--------------
+
+The `mapStateToProps()` function maps various state properties to the
+props of our component. The only property we care about is
+`compose.advanced_options`.
+
+*/
+
 const mapStateToProps = state => ({
   values: state.getIn(['compose', 'advanced_options']),
 });
 
+//  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+
+/*
+
+Dispatch mapping:
+-----------------
+
+The `mapDispatchToProps()` function maps dispatches to our store to the
+various props of our component. We just need to provide a dispatch for
+when an advanced option toggle changes.
+
+*/
+
 const mapDispatchToProps = dispatch => ({
 
   onChange (option) {