@@ -5,26 +5,31 @@ import Container from "@material-ui/core/Container";
5
5
import CloudUploadIcon from "@material-ui/icons/CloudUpload" ;
6
6
import css from "./index.module.less" ;
7
7
8
+ const dragsAndDrops = [
9
+ { name : "Domain" , fileType : ".pddl" , desc : "or predictes and actions." } ,
10
+ {
11
+ name : "Problem" ,
12
+ fileType : ".pddl" ,
13
+ desc : "for objects, initial state and goal." ,
14
+ } ,
15
+ {
16
+ name : "Animation" ,
17
+ fileType : ".pddl" ,
18
+ desc : "object is representation." ,
19
+ } ,
20
+ ] ;
8
21
class DropAndFetch extends React . Component {
9
22
constructor ( props ) {
10
23
super ( props ) ;
11
24
this . datas = { } ;
12
25
}
13
26
14
- state = {
15
- dragsAndDrops : [
16
- { name : "Domain" , fileType : ".pddl" , desc : "or predictes and actions." } ,
17
- {
18
- name : "Problem" ,
19
- fileType : ".pddl" ,
20
- desc : "for objects, initial state and goal." ,
21
- } ,
22
- {
23
- name : "Animation" ,
24
- fileType : ".pddl" ,
25
- desc : "object is representation." ,
26
- } ,
27
- ] ,
27
+
28
+
29
+ componentWillUnmount = ( ) => {
30
+ this . setState = ( state , callback ) => {
31
+ return ;
32
+ } ;
28
33
} ;
29
34
30
35
uploadPDDL = async ( files ) => {
@@ -70,7 +75,7 @@ class DropAndFetch extends React.Component {
70
75
< React . Fragment >
71
76
< div >
72
77
< Container component = "main" className = { css . dropareaBox } >
73
- { this . state . dragsAndDrops . map ( ( drag ) => (
78
+ { dragsAndDrops . map ( ( drag ) => (
74
79
< DropZone
75
80
key = { drag . name }
76
81
name = { drag . name }
@@ -80,7 +85,7 @@ class DropAndFetch extends React.Component {
80
85
/>
81
86
) ) }
82
87
</ Container >
83
- < Container maxWidth = "sm" component = "main" marginTop = "50" >
88
+ < Container maxWidth = "sm" component = "main" >
84
89
< div className = { css . buttonBox } >
85
90
< Button
86
91
variant = "contained"
0 commit comments