Skip to content

Commit 556735a

Browse files
authored
Merge pull request #9 from malithmcr/dev
key pro
2 parents a82b6c9 + 72a6a15 commit 556735a

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
2020
The page will reload if you make edits.<br>
2121
You 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

api/contact/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
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'];

src/components/Form/index.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff 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
/>

0 commit comments

Comments
 (0)