Skip to content

Commit 786b94d

Browse files
committed
resolving merge conflict
2 parents ce92828 + f1dde71 commit 786b94d

File tree

5 files changed

+13
-3
lines changed

5 files changed

+13
-3
lines changed

src/app/components/Diff.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ interface DiffProps {
1313
* @param props props from maincontainer
1414
* @returns a diff tree or a string stating no state changes have happened
1515
*/
16-
function Diff(props: DiffProps) {
16+
// LL added Record<string, unknown> for return statement on function
17+
function Diff(props: DiffProps): Record<string, unknown> {
1718
const { snapshot, show } = props;
1819
const [mainState] = useStoreContext();
1920
const { currentTab, tabs } = mainState; // k/v pairs of mainstate store object being created
@@ -28,7 +29,7 @@ function Diff(props: DiffProps) {
2829
}
2930

3031
// cleaning preview from stateless data
31-
const statelessCleanning = (obj:{name?:string; componentData?:object; state?:string|any;stateSnaphot?:object; children?:any[]}) => {
32+
const statelessCleanning = (obj:{name?:string; componentData?:object; state?:string|any; stateSnaphot?:object; children?:any[]}) => {
3233
const newObj = { ...obj };
3334
if (newObj.name === 'nameless') {
3435
delete newObj.name;

src/app/containers/MainContainer.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ function MainContainer(): JSX.Element {
2828
// this function handles Time Jump sidebar view
2929
const toggleActionContainer = () => {
3030
setActionView(!actionView);
31+
// aside is like an added text that appears "on the side" aside some text.
3132
const toggleElem = document.querySelector('aside');
3233
toggleElem.classList.toggle('no-aside');
3334
// hides the record toggle button from Actions Container in Time Jump sidebar view
@@ -47,6 +48,7 @@ function MainContainer(): JSX.Element {
4748
const currentPort = chrome.runtime.connect();
4849
// listen for a message containing snapshots from the background script
4950
currentPort.onMessage.addListener(
51+
// parameter message is an object with following type script properties
5052
(message: {
5153
action: string;
5254
payload: Record<string, unknown>;

src/app/containers/StateContainer.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
// @ts-nocheck
22
import React, { useState } from 'react';
3+
/* <Router> that keeps the history of your “URL” in memory (does not read/write to the address bar)
4+
Useful in tests and non-browser environments like React Native.
5+
*/
36
import {
47
MemoryRouter as Router,
58
Route,
@@ -8,6 +11,7 @@ import {
811
} from 'react-router-dom';
912
import StateRoute from '../components/StateRoute';
1013
import DiffRoute from '../components/DiffRoute';
14+
1115
interface StateContainerProps {
1216
snapshot: Record<
1317
number,

src/backend/helpers.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ export const getHooksNames = (elementType: string): Array<string> => {
8080
return ['unknown'];
8181
}
8282

83+
// hookNames will contain an object with methods (functions)
8384
const hooksNames: any = {};
8485

8586
// Begin search for hook names, only if ast has a body property.

src/backend/linkFiber.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,9 @@ function createTree(
360360
* linkFiber contains core module functionality, exported as an anonymous function.
361361
*/
362362
export default (snap: Snapshot, mode: Mode): (() => void) => {
363+
// checks for visiblity of document
363364
function onVisibilityChange(): void {
365+
// hidden property = background tab/minimized window
364366
doWork = !document.hidden;
365367
}
366368
return () => {
@@ -372,7 +374,7 @@ export default (snap: Snapshot, mode: Mode): (() => void) => {
372374
action: 'devToolsInstalled',
373375
payload: 'devToolsInstalled'
374376
}, '*');
375-
// reactInstance returns an object of the react
377+
// reactInstance returns an object of the react, 1st element in map
376378
const reactInstance = devTools.renderers.get(1);
377379
// if no React Instance found then target is not a compatible app
378380
if (!reactInstance) { return; }

0 commit comments

Comments
 (0)