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.
2020The page will reload if you make edits.<br >
2121You will also see any lint errors in the console.
2222
23+ ### ` npm run build `
24+
25+ Build this project for production.
2326
2427
2528## Usage only the component
Original file line number Diff line number Diff line change 99 // set response code - 200 OK
1010 http_response_code (200 );
1111 $ subject = $ _POST ['fname ' ];
12- $ to = "me @malith.pro " ;
12+ $ to = "hey @malith.dev " ; //TODO: Please change this before using
1313 $ from = $ _POST ['email ' ];
1414 //data
1515 $ msg = $ _POST ['number ' ] . $ _POST ['message ' ];
Original file line number Diff line number Diff line change @@ -45,26 +45,26 @@ class Form extends React.Component {
4545 < div >
4646 < form action = "#" >
4747 { fields &&
48- fields . map ( fields => {
48+ fields . map ( field => {
4949 return (
50- < React . Fragment >
51- { fields . type !== "textarea" ? (
50+ < React . Fragment key = { field . id } >
51+ { field . type !== "textarea" ? (
5252 < React . Fragment >
53- < label > { fields . label } </ label >
53+ < label > { field . label } </ label >
5454 < 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 }
5858 value = { this . state . fname }
5959 onChange = { e => this . setState ( { fname : e . target . value } ) }
6060 />
6161 </ React . Fragment >
6262 ) : (
6363 < React . Fragment >
64- < label > { fields . label } </ label >
64+ < label > { field . label } </ label >
6565 < textarea
66- className = { fields . klassName }
67- placeholder = { fields . placeholder }
66+ className = { field . klassName }
67+ placeholder = { field . placeholder }
6868 onChange = { e => this . setState ( { message : e . target . value } ) }
6969 value = { this . state . message }
7070 />
You can’t perform that action at this time.
0 commit comments