Added language support
This commit is contained in:
@ -10,6 +10,8 @@ import React from 'react';
|
||||
|
||||
import { Form, InputGroup, TextInput } from './Form';
|
||||
import Button from './../components/Button';
|
||||
import { connect } from 'react-redux';
|
||||
import Language from './../../language/Language';
|
||||
|
||||
class ContactForm extends React.Component {
|
||||
constructor(props) {
|
||||
@ -19,23 +21,28 @@ class ContactForm extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<Form className={this.props.className}>
|
||||
<InputGroup title="Name">
|
||||
<TextInput placeholder="Enter your name." />
|
||||
<InputGroup title={Language.get("contact.form.name.label")} >
|
||||
<TextInput placeholder={Language.get("contact.form.name.placeholder")} />
|
||||
</InputGroup>
|
||||
|
||||
<InputGroup title="Email">
|
||||
<TextInput type="email" placeholder="Enter your email address." />
|
||||
<InputGroup title={Language.get("contact.form.email.label")}>
|
||||
<TextInput type="email" placeholder={Language.get("contact.form.email.placeholder")} />
|
||||
</InputGroup>
|
||||
|
||||
<InputGroup title="Message">
|
||||
<TextInput multiline placeholder="Enter your message here." />
|
||||
<InputGroup title={Language.get("contact.form.message.label")}>
|
||||
<TextInput multiline placeholder={Language.get("contact.form.message.placeholder")} />
|
||||
</InputGroup>
|
||||
|
||||
<Button to="/">Home</Button>
|
||||
<Button submit>Contact</Button>
|
||||
<Button submit>{Language.get("contact.form.submit")}</Button>
|
||||
</Form>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default ContactForm;
|
||||
const mapStateToProps = function(state) {
|
||||
return {
|
||||
code: state.language.code
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(ContactForm);
|
||||
|
@ -17,6 +17,9 @@ import BodySection from './../sections/BodySection';
|
||||
|
||||
import ContactForm from './../forms/ContactForm';
|
||||
|
||||
import { connect } from 'react-redux';
|
||||
import Language from './../../language/Language';
|
||||
|
||||
class ContactPage extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
@ -27,10 +30,10 @@ class ContactPage extends React.Component {
|
||||
<Page>
|
||||
<PhoneSection />
|
||||
<BodySection>
|
||||
<h1>Contact</h1>
|
||||
<h1>{Language.get("contact.form.title")}</h1>
|
||||
<div className="c-page--style-container__split">
|
||||
<p className="c-page--style-container__split-part">
|
||||
Want to get ahold of me and other lorem ipsum dolor?
|
||||
{Language.get("contact.form.info")}
|
||||
</p>
|
||||
<ContactForm className="c-page--style-container__split-part" />
|
||||
</div>
|
||||
@ -40,4 +43,10 @@ class ContactPage extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
export default ContactPage;
|
||||
const mapStateToProps = function(state) {
|
||||
return {
|
||||
code: state.language.code
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps)(ContactPage);
|
||||
|
Reference in New Issue
Block a user