File tree Expand file tree Collapse file tree 3 files changed +14
-11
lines changed Expand file tree Collapse file tree 3 files changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
20
20
The page will reload if you make edits.<br >
21
21
You will also see any lint errors in the console.
22
22
23
+ ### ` npm run build `
24
+
25
+ Build this project for production.
23
26
24
27
25
28
## Usage only the component
Original file line number Diff line number Diff line change 9
9
// set response code - 200 OK
10
10
http_response_code (200 );
11
11
$ subject = $ _POST ['fname ' ];
12
- $ to = "me @malith.pro " ;
12
+ $ to = "hey @malith.dev " ; //TODO: Please change this before using
13
13
$ from = $ _POST ['email ' ];
14
14
//data
15
15
$ msg = $ _POST ['number ' ] . $ _POST ['message ' ];
Original file line number Diff line number Diff line change @@ -45,26 +45,26 @@ class Form extends React.Component {
45
45
< div >
46
46
< form action = "#" >
47
47
{ fields &&
48
- fields . map ( fields => {
48
+ fields . map ( field => {
49
49
return (
50
- < React . Fragment >
51
- { fields . type !== "textarea" ? (
50
+ < React . Fragment key = { field . id } >
51
+ { field . type !== "textarea" ? (
52
52
< React . Fragment >
53
- < label > { fields . label } </ label >
53
+ < label > { field . label } </ label >
54
54
< input
55
- type = { fields . type }
56
- className = { fields . klassName }
57
- placeholder = { fields . placeholder }
55
+ type = { field . type }
56
+ className = { field . klassName }
57
+ placeholder = { field . placeholder }
58
58
value = { this . state . fname }
59
59
onChange = { e => this . setState ( { fname : e . target . value } ) }
60
60
/>
61
61
</ React . Fragment >
62
62
) : (
63
63
< React . Fragment >
64
- < label > { fields . label } </ label >
64
+ < label > { field . label } </ label >
65
65
< textarea
66
- className = { fields . klassName }
67
- placeholder = { fields . placeholder }
66
+ className = { field . klassName }
67
+ placeholder = { field . placeholder }
68
68
onChange = { e => this . setState ( { message : e . target . value } ) }
69
69
value = { this . state . message }
70
70
/>
You can’t perform that action at this time.
0 commit comments