Skip to content

Commit d95d114

Browse files
committed
Merged conflicts resolved
2 parents c36d8a4 + 9219b14 commit d95d114

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

src/app/RTKslices.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,12 @@ export const mainSlice = createSlice({
125125
if (!mode?.paused) {
126126
if (typeof action.payload === 'number') {
127127
state.currentTab = action.payload;
128+
return;
128129
} else if (typeof action.payload === 'object') {
129130
state.currentTab = action.payload.tabId;
130131
if (action.payload?.title)
131132
state.currentTitle = action.payload.title;
133+
return;
132134
};
133135
}
134136
},
@@ -329,7 +331,9 @@ export const mainSlice = createSlice({
329331
switch (action.payload) {
330332
case 'paused':
331333
actionText = 'setPause';
334+
break;
332335
default:
336+
break;
333337
}
334338
port.postMessage({
335339
action: actionText,
@@ -402,6 +406,7 @@ export const mainSlice = createSlice({
402406
const { newSeries, newSeriesName } = action.payload;
403407
if (!tabs[currentTab].seriesSavedStatus) {
404408
tabs[currentTab] = { ...tabs[currentTab], seriesSavedStatus: 'inputBoxOpen' };
409+
//testing return to fix save functionality
405410
return;
406411
}
407412
// Runs if series name input box is active.
@@ -415,6 +420,7 @@ export const mainSlice = createSlice({
415420
seriesArray.push(newSeries);
416421
localStorage.setItem('project', JSON.stringify(seriesArray));
417422
tabs[currentTab] = { ...tabs[currentTab], seriesSavedStatus: 'saved' };
423+
//testing return to fix save functionality instead of break
418424
return;
419425
}
420426
},

src/app/components/StateRoute/PerformanceVisx/BarGraph.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,17 @@ const BarGraph = (props: BarGraphProps): JSX.Element => {
113113
});
114114

115115
const saveSeriesClickHandler = () => { // function to save the currently selected series
116+
console.log('we are in save series click handler')
116117
if (tabs[currentTab].seriesSavedStatus === 'inputBoxOpen') {
118+
console.log('we are inside the conditional within saveSeriesClickHandler')
119+
console.log('this is the comparison.length', comparison.length)
117120
const actionNames = document.getElementsByClassName('actionname');
118121
for (let i = 0; i < actionNames.length; i += 1) {
119122
toStorage.data.barStack[i].name = actionNames[i].value;
120123
}
121-
122-
// dispatch(save(toStorage, seriesNameInput)); // saves the series under seriesName
123-
dispatch(save({ newSeries: toStorage, newSeriesName: seriesNameInput }));
124-
124+
console.log('this is seriesnameINput', seriesNameInput);
125+
console.log('this is toStorage', toStorage);
126+
dispatch(save({ newSeries: toStorage, newSeriesName: seriesNameInput })); // saves the series under seriesName
125127
setSeriesNameInput(`Series ${comparison.length}`); // sends a reducer that saves the series/toStorage object the user wants to chrome local storage
126128
return;
127129
}

src/app/components/StateRoute/PerformanceVisx/PerformanceVisx.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ const traverse = (snapshot, data, snapshots, currTotalRender: currNum = 0): void
123123
const allStorage = (): Series[] => {
124124
let values = localStorage.getItem('project');
125125
const newValues: Series[] = values === null ? [] : JSON.parse(values);
126+
console.log('this is newValues', newValues);
126127
return newValues;
127128
};
128129

0 commit comments

Comments
 (0)