You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/app/components/App.tsx
+7-6Lines changed: 7 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -6,13 +6,14 @@ import mainReducer from '../reducers/mainReducer.js';
6
6
import{InitialStateProps}from'../FrontendTypes';
7
7
import{ThemeProvider}from'@mui/material/styles';
8
8
importthemefrom'./theme';
9
-
// currentTab is the current active tab within Google Chrome.
10
-
// This is used to decide what tab Reactime should be monitoring. This can be "locked"
11
-
// currentTabInApp is the current active tab within Reactime (Map, Performance, History, etc).
12
-
// This is used to determine the proper tutorial to render when How To button is pressed.
13
9
14
-
// we initialize what our initialState is here
15
-
constinitialState: InitialStateProps={
10
+
/*
11
+
'currentTab' is the current active tab within Google Chrome.
12
+
This is used to decide what tab Reactime should be monitoring. This can be "locked" currentTabInApp is the current active tab within Reactime (Map, Performance, History, etc).
13
+
This is used to determine the proper tutorial to render when How To button is pressed.
14
+
*/
15
+
16
+
constinitialState: InitialStateProps={// we initialize what our initialState is here
Copy file name to clipboardExpand all lines: src/app/components/SwitchApp.tsx
+8-14Lines changed: 8 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -10,31 +10,25 @@ import { setTab } from '../actions/actions';
10
10
*/
11
11
12
12
constSwitchAppDropdown=(): JSX.Element=>{
13
-
// we destructure the returned context object from the invocation of the useStoreContext function. Properties not found on the initialState object (dispatch) are from the useReducer function invocation in the App component
// tabsArray is an empty array that will take objects as it's elements
16
-
consttabsArray: {}[]=[];
13
+
const[{ currentTab, tabs },dispatch]=useStoreContext();// we destructure the returned context object from the invocation of the useStoreContext function. Properties not found on the initialState object (dispatch) are from the useReducer function invocation in the App component
14
+
15
+
consttabsArray: {}[]=[];// tabsArray is an empty array that will take objects as it's elements
17
16
18
-
// We populate our 'tabsArray' with objects derived from the 'tab' that is currently being iterated on.
19
-
Object.keys(tabs).forEach((tab)=>{
17
+
Object.keys(tabs).forEach((tab)=>{// We populate our 'tabsArray' with objects derived from the 'tab' that is currently being iterated on.
const{ Steps }=require('intro.js-react');//Must be required in. This enables compatibility with TS. If imported in, throws ts error of not rendering steps as a class component correctly.
13
+
14
+
/*
15
+
This is the tutorial displayed when the "How to use" button is clicked
16
+
This needs to be a class component to be compatible with updateStepElement from intro.js
17
+
*/
14
18
15
-
// This is the tutorial displayed when the "How to use" button is clicked
16
-
// This needs to be a class component to be compatible with updateStepElement from intro.js
0 commit comments