Skip to content

Commit c6a92ed

Browse files
committed
prettier
1 parent a53c7ed commit c6a92ed

File tree

2 files changed

+12
-17
lines changed

2 files changed

+12
-17
lines changed

src/app/reducers/mainReducer.js

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default (state, action) =>
1414
//console.log(tabs[currentTab]);
1515
//console.log('properties of tabs[currentTab]:', hierarchy, snapshots, mode, intervalId, viewIndex, sliderIndex)
1616

17-
//console.log('reducer file!', 'hierarchy:', hierarchy, 'tabs:', tabs)
17+
//console.log('reducer file!', 'hierarchy:', hierarchy, 'tabs:', tabs)
1818

1919
// eslint-disable-next-line max-len
2020
// function that finds the index in the hierarchy and extracts the name of the equivalent index to add to the post message
@@ -44,7 +44,7 @@ export default (state, action) =>
4444
switch (action.type) {
4545
// This saves the series user wants to save to chrome local storage
4646
case types.SAVE: {
47-
console.log('save action reducer!', 'payload:', action.payload)
47+
console.log('save action reducer!', 'payload:', action.payload);
4848
const { newSeries, newSeriesName } = action.payload;
4949
if (!tabs[currentTab].seriesSavedStatus) {
5050
tabs[currentTab] = { ...tabs[currentTab], seriesSavedStatus: 'inputBoxOpen' };
@@ -185,8 +185,8 @@ export default (state, action) =>
185185
break;
186186
}
187187
case types.EMPTY: {
188-
console.log('-----clear snapshots reducer----')
189-
console.log('state before:', state.tabs[currentTab])
188+
console.log('-----clear snapshots reducer----');
189+
console.log('state before:', state.tabs[currentTab]);
190190

191191
// send msg to background script
192192
port.postMessage({ action: 'emptySnap', tabId: currentTab }); //communicate with background.js
@@ -220,10 +220,10 @@ export default (state, action) =>
220220
break;
221221
}
222222
case types.IMPORT: {
223-
// Log the value of tabs[currentTab].snapshots before the update
224-
console.log('-----import snapshots reducer----')
225-
console.log('state before:', state.tabs[currentTab])
226-
console.log('action payload:', action.payload)
223+
// Log the value of tabs[currentTab].snapshots before the update
224+
console.log('-----import snapshots reducer----');
225+
console.log('state before:', state.tabs[currentTab]);
226+
console.log('action payload:', action.payload);
227227

228228
port.postMessage({
229229
action: 'import',
@@ -254,11 +254,8 @@ export default (state, action) =>
254254
tabs[currentTab].currBranch = savedSnapshot.Branch;
255255
tabs[currentTab].seriesSavedStatus = false;
256256

257-
258257
//============
259258
//tabs[currentTab].snapshots = action.payload.snapshots;
260-
261-
262259

263260
// console.log('New snapshots:', action.payload);
264261
// console.log('updated tabs[CurrentTab].snapshots:', tabs[currentTab].snapshots)

src/extension/background.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,20 +181,18 @@ chrome.runtime.onConnect.addListener((port) => {
181181

182182
switch (action) {
183183
case 'import': // create a snapshot property on tabId and set equal to tabs object
184-
const savedSnapshot = payload
185-
console.log('background.js savedSnapshot:', savedSnapshot)
184+
const savedSnapshot = payload;
185+
console.log('background.js savedSnapshot:', savedSnapshot);
186186
// may need do something like filter payload from stateless
187187
tabsObj[tabId].snapshots = savedSnapshot.snapshots;
188188

189189
// reset snapshots to page last state recorded
190-
tabsObj[tabId].snapshots = savedSnapshot.snapshots
191-
192-
190+
tabsObj[tabId].snapshots = savedSnapshot.snapshots;
193191

194192
// resets hierarchy
195193
tabsObj[tabId].hierarchy.children = savedSnapshot.hierarchy.children;
196194
// resets hierarchy to page last state recorded
197-
tabsObj[tabId].hierarchy.stateSnapshot = savedSnapshot.hierarchy.stateSnapshot
195+
tabsObj[tabId].hierarchy.stateSnapshot = savedSnapshot.hierarchy.stateSnapshot;
198196
// resets currLocation to page last state recorded
199197
tabsObj[tabId].currLocation = savedSnapshot.currLocation;
200198
tabsObj[tabId].index = savedSnapshot.index;

0 commit comments

Comments
 (0)