Skip to content

Commit 35aa8b6

Browse files
committed
Merge branch 'additionalMui' of https://github.com/oslabs-beta/reactime into additionalMui
2 parents c098c1b + b8af96d commit 35aa8b6

File tree

4 files changed

+5
-18
lines changed

4 files changed

+5
-18
lines changed

src/app/FrontendTypes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export interface BarGraphBase {
7979

8080
export interface BarGraphComparisonProps extends BarGraphBase {
8181
setSeries: (e: boolean | string) => void;
82-
series: number | boolean; // was number 8/3/2023
82+
series: number;
8383
setAction: (e: boolean | string) => void;
8484
}
8585

src/app/components/App.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ import theme from './theme';
1313
This is used to determine the proper tutorial to render when How To button is pressed.
1414
*/
1515

16-
const initialState: InitialStateProps = {
17-
// we initialize what our initialState is here
16+
const initialState: InitialStateProps = { // we initialize what our initialState is here
1817
port: null,
1918
currentTab: null,
2019
currentTitle: 'No Target',
@@ -26,10 +25,8 @@ function App(): JSX.Element {
2625
return (
2726
<ThemeProvider theme={theme}>
2827
<Router>
29-
{' '}
3028
{/* we wrap our application with the <Router> tag so that all components that are nested will have the react-router context */}
3129
<StoreContext.Provider value={useReducer(mainReducer, initialState)}>
32-
{' '}
3330
{/* we wrap our MainContainer with the provider so that we will be able to use the store context. We create our store by using useReducer and passing it into the value property */}
3431
<MainContainer />
3532
</StoreContext.Provider>

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,7 @@ const PerformanceVisx = (props: PerformanceVisxProps): JSX.Element => {
195195
}, [dispatch]);
196196

197197
const renderComparisonBargraph = () => {
198-
console.log('hierarchy', hierarchy);
199-
console.log('series', series);
200-
console.log('hierarchy && series !== false', hierarchy && series !== false);
201198
if (hierarchy && series !== false) {
202-
console.log('barGraphComparison triggered');
203199
return (
204200
<BarGraphComparison
205201
comparison={allStorage()}
@@ -212,7 +208,6 @@ const PerformanceVisx = (props: PerformanceVisxProps): JSX.Element => {
212208
/>
213209
);
214210
}
215-
console.log('barGraphComparisonActions triggered');
216211
return (
217212
<BarGraphComparisonActions
218213
comparison={allStorage()}

src/app/containers/ActionContainer.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ function ActionContainer(props): JSX.Element {
5858
obj.stateSnapshot.children[0].state && // with a 'state'
5959
obj.stateSnapshot.children[0].name // and a 'name'
6060
) {
61-
const newObj: Record<string, unknown> = {
62-
// we create a new Record object (whose property keys are Keys and whose property values are Type. This utility can be used to map the properties of a type to another type) and populate it's properties with relevant values from our argument 'obj'.
61+
const newObj: Record<string, unknown> = { // we create a new Record object (whose property keys are Keys and whose property values are Type. This utility can be used to map the properties of a type to another type) and populate it's properties with relevant values from our argument 'obj'.
6362
index: obj.index,
6463
displayName: `${obj.name}.${obj.branch}`,
6564
state: obj.stateSnapshot.children[0].state,
@@ -73,8 +72,7 @@ function ActionContainer(props): JSX.Element {
7372
hierarchyArr.push(newObj); // we push our record object into 'hiearchyArr' defined on line 35
7473
}
7574

76-
if (obj.children) {
77-
// if argument has a 'children' array, we iterate through it and run 'displayArray' on each element
75+
if (obj.children) { // if argument has a 'children' array, we iterate through it and run 'displayArray' on each element
7876
obj.children.forEach((element): void => {
7977
displayArray(element);
8078
});
@@ -98,8 +96,7 @@ function ActionContainer(props): JSX.Element {
9896
currIndex++;
9997
if (currIndex > hierarchyArr.length - 1) return;
10098
dispatch(changeView(currIndex));
101-
} else if (e.key === 'Enter') {
102-
// enter key pressed
99+
} else if (e.key === 'Enter') { // enter key pressed
103100
e.stopPropagation(); // prevents further propagation of the current event in the capturing and bubbling phases
104101
e.preventDefault(); // needed or will trigger onClick right after
105102
dispatch(changeSlider(currIndex));
@@ -108,8 +105,6 @@ function ActionContainer(props): JSX.Element {
108105

109106
// Sort hierarchyArr by index property of each object. This will be useful when later when we build our components so that our components will be displayed in index/chronological order
110107
hierarchyArr.sort((a: Obj, b: Obj): number => a.index - b.index);
111-
// Sort hierarchyArr by index property of each object. This will be useful later when we render the components: components will be displayed in index/chronological order
112-
hierarchyArr.sort((a:Obj, b:Obj):number => a.index - b.index);
113108

114109
// we create a map of components that are constructed from "hierarchyArr's" elements/snapshots
115110
actionsArr = hierarchyArr.map(

0 commit comments

Comments
 (0)