Skip to content

Commit 2e62366

Browse files
committed
review comments
1 parent 03eeeec commit 2e62366

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

src/app/reducers/mainReducer.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default (state, action) => produce(state, draft => {
1515
} = tabs[currentTab] || {};
1616

1717
// eslint-disable-next-line max-len
18-
// gabi and nate :: function that find the index in the hierarchy and extract the name of the equivalent index to add to the post message
18+
// function that finds the index in the hierarchy and extracts the name of the equivalent index to add to the post message
1919
// eslint-disable-next-line consistent-return
2020
const findName = (index, obj) => {
2121
// eslint-disable-next-line eqeqeq
@@ -41,7 +41,7 @@ export default (state, action) => produce(state, draft => {
4141
if (snapshots.length > 0 && sliderIndex > 0) {
4242
const newIndex = sliderIndex - 1;
4343
// eslint-disable-next-line max-len
44-
// gabi and nate :: find the name by the newIndex parsing through the hierarchy to send to background.js the current name in the jump action
44+
// finds the name by the newIndex parsing through the hierarchy to send to background.js the current name in the jump action
4545
const nameFromIndex = findName(newIndex, hierarchy);
4646

4747
port.postMessage({
@@ -62,7 +62,7 @@ export default (state, action) => produce(state, draft => {
6262
if (sliderIndex < snapshots.length - 1) {
6363
const newIndex = sliderIndex + 1;
6464
// eslint-disable-next-line max-len
65-
// gabi and nate :: find the name by the newIndex parsing through the hierarchy to send to background.js the current name in the jump action
65+
// finds the name by the newIndex parsing through the hierarchy to send to background.js the current name in the jump action
6666
const nameFromIndex = findName(newIndex, hierarchy);
6767

6868
port.postMessage({
@@ -85,7 +85,7 @@ export default (state, action) => produce(state, draft => {
8585
}
8686
case types.SLIDER_ZERO: {
8787
// eslint-disable-next-line max-len
88-
// gabi and nate :: reset name to 0 to send to background.js the current name in the jump action
88+
// resets name to 0 to send to background.js the current name in the jump action
8989
port.postMessage({
9090
action: 'jumpToSnap',
9191
index: 0,
@@ -104,7 +104,7 @@ export default (state, action) => produce(state, draft => {
104104
}
105105
case types.CHANGE_SLIDER: {
106106
// eslint-disable-next-line max-len
107-
// gabi and nate :: finds the name by the action.payload, parsing through the hierarchy to send to background.js the current name in the jump action
107+
// finds the name by the action.payload parsing through the hierarchy to send to background.js the current name in the jump action
108108
const nameFromIndex = findName(action.payload, hierarchy);
109109

110110
port.postMessage({
@@ -122,28 +122,28 @@ export default (state, action) => produce(state, draft => {
122122
tabs[currentTab].sliderIndex = 0;
123123
tabs[currentTab].viewIndex = -1;
124124
tabs[currentTab].playing = false;
125-
// gabi :: activate empty mode
125+
// activates empty mode
126126
tabs[currentTab].mode.empty = true;
127-
// gabi :: record snapshot of page initial state
127+
// records snapshot of page initial state
128128
tabs[currentTab].initialSnapshot.push(tabs[currentTab].snapshots[0]);
129-
// gabi :: reset snapshots to page last state recorded
129+
// resets snapshots to page last state recorded
130130
// eslint-disable-next-line max-len
131131
tabs[currentTab].snapshots = [tabs[currentTab].snapshots[tabs[currentTab].snapshots.length - 1]];
132-
// gabi :: record hierarchy of page initial state
132+
// records hierarchy of page initial state
133133
tabs[currentTab].initialHierarchy = { ...tabs[currentTab].hierarchy };
134134
tabs[currentTab].initialHierarchy.children = [];
135-
// gabi :: reset hierarchy
135+
// resets hierarchy
136136
tabs[currentTab].hierarchy.children = [];
137-
// gabi :: reset hierarchy to page last state recorded
137+
// resets hierarchy to page last state recorded
138138
// eslint-disable-next-line prefer-destructuring
139139
tabs[currentTab].hierarchy.stateSnapshot = tabs[currentTab].snapshots[0];
140-
// gabi :: reset currLocation to page last state recorded
140+
// resets currLocation to page last state recorded
141141
tabs[currentTab].currLocation = tabs[currentTab].hierarchy;
142-
// gabi :: reset index
142+
// resets index
143143
tabs[currentTab].index = 0;
144-
// gabi :: reset currParent plus current state
144+
// resets currParent plus current state
145145
tabs[currentTab].currParent = 1;
146-
// gabi :: reset currBranch
146+
// resets currBranch
147147
tabs[currentTab].currBranch = 0;
148148
break;
149149
}

0 commit comments

Comments
 (0)