Skip to content

Instantly share code, notes, and snippets.

@yunderboy
Last active October 3, 2016 06:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yunderboy/e57808cfe73f7a5e765f20baee3a3de1 to your computer and use it in GitHub Desktop.
Save yunderboy/e57808cfe73f7a5e765f20baee3a3de1 to your computer and use it in GitHub Desktop.
// Uses https://github.com/erikras/redux-form to bind form events to redux state
/* Receives following error on run
warning.js: 45 Warning: React.createElement: type should not be null, undefined, boolean, or number. It should be a string (for DOM elements) or a ReactClass (for composite components). Check the render method of `SitesAndLocale`.warning @ warning.js:45
invariant.js:46 Uncaught Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. Check the render method of `SitesAndLocale`.
*/
import React from "react";
import { Field, reduxForm } from "redux-form";
import FromSite from "./FromSite";
import LocaleOptions from "./LocaleOptions";
export default class SitesAndLocale extends React.Component {
render() {
const { handleSubmit } = (this.props);
return (
<div>
<h2>Oversæt produkterne i din DanDomain webshop</h2>
<br/>
<span>HUSK før du kan oversætte til et nye "site", er det vigtigt at dette er oprettet i webshoppen inden du forsætter.</span>
<br/>
<form onSubmit={handleSubmit}>
<FromSite/>
<br/>
<LocaleOptions/>
<br/>
<div>
<label htmlFor="email">Email</label>
<Field name="email" component="input" type="email"/>
</div>
<button type="submit">Videre til salg af produkter</button>
</form>
</div>
);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment