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
This is the loading screen that a user may get when first initalizing the application. This page checks:
9
10
@@ -13,8 +14,10 @@ This is the loading screen that a user may get when first initalizing the applic
13
14
*/
14
15
15
16
functionErrorContainer(): JSX.Element{
16
-
const[store,dispatch]=useStoreContext();// We destructure the returned context object from the invocation of the 'useStoreContext' function. Properties not found on the 'initialState' object ('store'/'dispatch') are from the 'useReducer' function invocation in the 'App' component
17
-
const{ tabs, currentTitle, currentTab }=store;// We continue to destructure 'store' and get the 'tabs'/'currentTab'/'port'
17
+
constdispatch=useDispatch();
18
+
// const [store, dispatch] = useStoreContext(); // We destructure the returned context object from the invocation of the 'useStoreContext' function. Properties not found on the 'initialState' object ('store'/'dispatch') are from the 'useReducer' function invocation in the 'App' component
// const { tabs, currentTitle, currentTab } = store; // We continue to destructure 'store' and get the 'tabs'/'currentTab'/'port'
18
21
const[loadingArray,setLoading]=useState([true,true,true]);// We create a local state "loadingArray" and set it to an array with three true elements. These will be used as hooks for error checking against a 'status' object that is declared later in a few lines. 'loadingArray' is used later in the return statement to display a spinning loader icon if it's true. If it's false, either a checkmark icon or an exclamation icon will be displayed to the user.
19
22
consttitleTracker=useRef(currentTitle);// useRef returns an object with a property 'initialValue' and a value of whatever was passed in. This allows us to reference a value that's not needed for rendering
20
23
consttimeout=useRef(null);
@@ -123,4 +126,4 @@ function ErrorContainer(): JSX.Element {
0 commit comments