Skip to content

Commit de79aef

Browse files
committed
changes resolved
1 parent fc884e2 commit de79aef

File tree

11 files changed

+51
-455
lines changed

11 files changed

+51
-455
lines changed

src/components/editor/editor.js

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,19 @@ class EditorChat extends Component {
1414
contentValue: "",
1515
disabled: true,
1616
};
17-
this.handleEditorChange = this.handleEditorChange.bind(this);
18-
this.handleValue = this.handleValue.bind(this);
1917
}
2018
handleOnSubmit = () => {
2119
this.setState({ content: "" });
2220
};
23-
handleEditorChange(content) {
24-
if (content.length > 0) {
25-
this.setState({ disabled: false });
26-
} else {
27-
this.setState({ disabled: true });
28-
}
29-
this.setState({ content });
30-
}
31-
handleValue(value) {
21+
handleEditorChange = (content) => {
22+
this.setState({
23+
content,
24+
disabled: !(content.length > 0),
25+
});
26+
};
27+
handleValue = (value) => {
3228
this.setState({ contentValue: value });
33-
}
29+
};
3430

3531
render() {
3632
return (
@@ -75,7 +71,7 @@ class EditorChat extends Component {
7571
menubar: false,
7672
branding: false,
7773
plugins: [
78-
"advlist autolink lists link image preview",
74+
"advlist autolink lists link image preview mentions",
7975
"charmap print preview anchor code",
8076
"searchreplace visualblocks codesample",
8177
"insertdatetime media table paste wordcount textpattern",

src/components/navbar/navbar.js

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
} from "react-bootstrap";
1212
import "./navbar.scss";
1313
import Announcements from "../announcements/announcement";
14-
import Tasks from "../tasks/tasks"
14+
import Tasks from "../tasks/tasks";
1515
import LoginForm from "../loginform/loginform";
1616
import SignUpForm from "../signupform/signupform";
1717

@@ -23,32 +23,28 @@ class NavBar extends Component {
2323
isLogin: false,
2424
username: localStorage.getItem("username"),
2525
};
26-
this.handleShow = this.handleShow.bind(this);
27-
this.handleClose = this.handleClose.bind(this);
28-
this.handleLogin = this.handleLogin.bind(this);
29-
this.handleLogout = this.handleLogout.bind(this);
3026
}
3127
handleShowTask = () => {
3228
this.setState({ showModal: true });
3329
};
34-
handleShow() {
30+
handleShow = () => {
3531
this.setState({ showModal: true });
36-
}
37-
handleClose() {
32+
};
33+
handleClose = () => {
3834
this.setState({ showModal: false });
39-
}
40-
handleLogin() {
35+
};
36+
handleLogin = () => {
4137
this.setState({
4238
isLogin: true,
4339
username: localStorage.getItem("username"),
4440
});
4541
this.props.handleClose();
46-
}
47-
handleLogout(e) {
42+
};
43+
handleLogout = (e) => {
4844
e.preventDefault();
4945
localStorage.clear();
5046
this.setState({ isLogin: false, username: null });
51-
}
47+
};
5248
render() {
5349
return (
5450
<div>
@@ -92,7 +88,7 @@ class NavBar extends Component {
9288
<Announcements />
9389
</NavDropdown>
9490
<NavDropdown title="Tasks" id="collasible-nav-dropdown">
95-
<Tasks/>
91+
<Tasks />
9692
</NavDropdown>
9793
<Nav.Link href="#option2">Options</Nav.Link>
9894
<Nav.Link href="#option3">Options</Nav.Link>

src/components/projects/projects.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
import React, { Component } from "react";
22
import { Card, Badge, Modal } from "react-bootstrap";
33
import "./projects.scss";
4-
import projectInfo1 from "../../jsonData/projects";
54
import { IconContext } from "react-icons";
65
import { FiPlus } from "react-icons/fi";
76
import { Droppable, DragDropContext, Draggable } from "react-beautiful-dnd";
87
import TopicForm from "../../components/topicform/topicform";
98
import converttodict from "../../utils/dictConversion";
109

1110
class Projects extends Component {
12-
state = projectInfo1;
1311
constructor(props) {
1412
super(props);
1513
this.state = {

src/components/signupform/signupform.js

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { Component } from "react";
22
import { Form, Button } from "react-bootstrap";
33
import "./signupform.scss";
4+
import { MdBorderAll } from "react-icons/md";
45

56
class SignUpForm extends Component {
67
constructor(props) {
@@ -16,15 +17,29 @@ class SignUpForm extends Component {
1617

1718
handleChange = (params, event) => {
1819
event.preventDefault();
19-
if (params === "email") {
20-
this.setState({ email: event.target.value });
21-
} else if (params === "password") {
22-
this.setState({ password: event.target.value });
23-
} else if (params === "passwordVerify") {
24-
this.setState({ passwordVerify: event.target.value });
25-
} else if (params === "username") {
26-
this.setState({ username: event.target.value });
20+
switch (params) {
21+
case "email":
22+
this.setState({ email: event.target.value });
23+
break;
24+
case "password":
25+
this.setState({ password: event.target.value });
26+
break;
27+
case "passwordVerify":
28+
this.setState({ passwordVerify: event.target.value });
29+
break;
30+
case "username":
31+
this.setState({ username: event.target.value });
32+
break;
2733
}
34+
// if (params === "email") {
35+
// this.setState({ email: event.target.value });
36+
// } else if (params === "password") {
37+
// this.setState({ password: event.target.value });
38+
// } else if (params === "passwordVerify") {
39+
// this.setState({ passwordVerify: event.target.value });
40+
// } else if (params === "username") {
41+
// this.setState({ username: event.target.value });
42+
// }
2843
};
2944

3045
handleSubmit = (e) => {

src/components/tasks/tasks.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React, { Component } from "react";
2-
import taskData from "../../jsonData/tasks";
32
import {
43
Button,
54
Tab,

src/jsonData/chats.js

Lines changed: 0 additions & 176 deletions
This file was deleted.

0 commit comments

Comments
 (0)