Skip to content

Commit 010edc9

Browse files
authored
Merge pull request #45 from jinsoolim/realrevert
Realrevert
2 parents 75d6e78 + 1a76601 commit 010edc9

File tree

4 files changed

+11
-16
lines changed

4 files changed

+11
-16
lines changed

__tests__/HTMLPanel.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ test('Renders HTMLPanel component', () => {
2727
<Test/>
2828
);
2929
expect(screen.getAllByRole('textbox')).toHaveLength(2);
30-
// console.log(container.firstChild);
3130
expect(screen.getByText('Div')).toBeInTheDocument();
3231
expect(screen.getByText('Image')).toBeInTheDocument();
3332
expect(screen.getByText('Form')).toBeInTheDocument();

app/src/components/login/FBPassWord.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ const SignUp: React.FC<LoginInt & RouteComponentProps> = props => {
8686
const handleSignUp = (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {
8787
e.preventDefault();
8888
const email = props.location.state.email;
89-
console.log(email);
9089
// Reset Error Validation
9190
setInvalidPasswordMsg('');
9291
setInvalidVerifyPasswordMsg('');
@@ -132,7 +131,7 @@ const SignUp: React.FC<LoginInt & RouteComponentProps> = props => {
132131
}
133132

134133
// get username and email from FB
135-
134+
136135
newUserIsCreated(email, email, password).then(userCreated => {
137136
if (userCreated === 'Success') {
138137
props.history.push('/');

app/src/components/main/Canvas.tsx

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,14 @@ import ListItem from '@material-ui/core/ListItem';
1010
import ListItemText from '@material-ui/core/ListItemText';
1111
import createModal from '../right/createModal';
1212

13-
const checkChildren = (child, currentComponent) => {
14-
for (let i = 0; i < child.length; i+=1) {
15-
if (child[i].children.length) {
16-
for (let j = 0; j < child[i].children.length; j+=1) {
17-
if (child[i].children[j].name === currentComponent.name) {
18-
return true;
19-
}
20-
}
21-
return checkChildren(child[i].children, currentComponent);
22-
}
23-
}
24-
return false;
13+
const findNestedChild = (curr, components) => {
14+
components.forEach((comp, i) => {
15+
comp.children.forEach(child => {
16+
if (child.name === curr.name) {};
17+
});
18+
if (comp.children.length !== 0) findNestedChild(curr, comp.children);
19+
});
20+
2521
};
2622

2723
function Canvas() {

app/src/reducers/componentReducer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,8 @@ const reducer = (state: State, action: Action) => {
484484
state.projectType,
485485
state.HTMLTypes
486486
);
487-
})
487+
}
488+
488489

489490
const canvasFocus = { componentId: 1, childId: null };
490491

0 commit comments

Comments
 (0)