Skip to content

Commit 83b23d7

Browse files
committed
removed useless console.log statements across the project
1 parent 9f08f08 commit 83b23d7

File tree

7 files changed

+10
-22
lines changed

7 files changed

+10
-22
lines changed

src/features/Download.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import { TransitionModel } from "../models";
77
import { AutomataData } from "../components/types/AutomataData";
88

99
export const Download = (props: DownloadProps) => {
10+
console.log("re rendering Download: props", props);
11+
1012
const dataContext = useContext(DataContext);
1113

1214
return (

src/features/NfaToDfa.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,13 @@ export const NfaToDfa = () => {
5454
),
5555
};
5656
});
57-
console.log("nullClosureRowsUnique", nullClosureRowsUnique);
5857

5958
const nullClosureStatesUnique = dataContext.states.map((state) => {
6059
return {
6160
...state,
6261
id: state.id + NullClosureStateId,
6362
};
6463
});
65-
console.log("nullClosureStatesUnique", nullClosureStatesUnique);
6664

6765
const nullClosureTransitionsUnique = dataContext.transitions.map(
6866
(transition) => {
@@ -73,7 +71,6 @@ export const NfaToDfa = () => {
7371
};
7472
}
7573
);
76-
console.log("nullClosureTransitionsUnique", nullClosureTransitionsUnique);
7774

7875
setNullClosureRows(nullClosureRowsUnique);
7976
setNullClosureStates(nullClosureStatesUnique);

src/features/Playground.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ const Playground = (props: PlaygroundProps) => {
3131
const { setPlaygroundSize } = props;
3232

3333
useEffect(() => {
34-
console.log("useEffect of playground due to width & height", width, height);
3534
setPlaygroundSize({ width, height });
3635
}, [width, height, setPlaygroundSize]);
3736

src/features/TestAString.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,7 @@ const TestAString = (props: TestAStringProps) => {
183183
};
184184

185185
const handleAnimation = () => {
186-
console.log("TestAString handleAnimation");
187186
if (isComplete) {
188-
console.log("TestAString handleAnimation isComplete");
189187
// if animation is complete, reset everything i.e., replay
190188
setIsReady(false);
191189
setIsComplete(false);
@@ -212,10 +210,7 @@ const TestAString = (props: TestAStringProps) => {
212210
};
213211

214212
const showNextRow = () => {
215-
console.log("TestAString show next row");
216-
if (isComplete) {
217-
setIsReady(true);
218-
}
213+
if (isComplete) setIsReady(true);
219214

220215
handleUpdateData();
221216

src/features/Upload.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import { UploadProps } from "./props/UploadProps";
99
import { StateMaxSize, StateMinSize } from "../consts/StateSizes";
1010

1111
export const Upload = (props: UploadProps) => {
12+
console.log("re rendering Upload: props", props);
13+
1214
const dataContext = useContext(DataContext);
1315

1416
const handleSetTransitions = (transitions: TransitionModel[]) => {

src/features/components/playground/State.tsx

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,8 @@ export const State = (props: StateProps) => {
2323
const handleClick = (e: any) => {
2424
e.stopPropagation(); // so that click/touch event will be fired on the state only and not on the container itself
2525

26-
if (props?.core?.actionState === "Normal") {
27-
console.log("Box handleClick Normal", props);
28-
props?.core?.handleSelect(e);
29-
} else if (props?.core?.actionState === "Add Transition") {
30-
console.log("Box handleClick Add Transition", props);
31-
26+
if (props?.core?.actionState === "Normal") props?.core?.handleSelect(e);
27+
else if (props?.core?.actionState === "Add Transition") {
3228
// restrict adding of new transition between states where a transition already exists
3329
if (
3430
!dataContext?.transitions.find(
@@ -37,8 +33,8 @@ export const State = (props: StateProps) => {
3733
transition.end === props.state.id
3834
)
3935
) {
40-
console.log("Box handleClick Add Transition setTransitions", props);
4136
const isSelfTransition = props?.core?.selected?.id === props.state.id;
37+
4238
dataContext?.setTransitions((transitions: TransitionModel[]) => [
4339
...transitions,
4440
new TransitionModel({
@@ -56,8 +52,7 @@ export const State = (props: StateProps) => {
5652
}),
5753
]);
5854
}
59-
} else if (props?.core?.actionState === "Remove Transitions") {
60-
console.log("Box handleClick Remove Transitions", props);
55+
} else if (props?.core?.actionState === "Remove Transitions")
6156
dataContext?.setTransitions((transitions: TransitionModel[]) =>
6257
transitions.filter(
6358
(transition) =>
@@ -67,10 +62,8 @@ export const State = (props: StateProps) => {
6762
)
6863
)
6964
);
70-
}
7165
};
7266

73-
console.log("changing background color now", props?.core?.actionState);
7467
let background = null;
7568
if (props?.core?.selected && props?.core?.selected?.id === props.state.id) {
7669
background = stateSelectedColor;

src/features/components/playground/Xarrow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default (props: XarrowProps) => {
2020
onMouseLeave: () => setState({ color: transitionColor }),
2121
onClick: (e: any) => {
2222
e.stopPropagation(); //so only the click event on the state will fire on not on the container itself
23-
console.log("Xarrow onClick props", props);
23+
2424
props?.core?.setSelected({
2525
id: {
2626
start: props.transition.start,

0 commit comments

Comments
 (0)