Add propTypes and defaultProps to Page

This commit is contained in:
Kimmo Puputti 2017-01-18 15:40:51 +02:00
parent f9d16149e5
commit f5779f63f4
21 changed files with 31 additions and 23 deletions

View file

@ -1,8 +1,8 @@
import React from 'react';
import React, { PropTypes } from 'react';
import Helmet from 'react-helmet';
import { Topbar } from '../../containers';
export default props => {
const Page = props => {
const { className, title, children } = props;
return (
<div className={className}>
@ -12,4 +12,12 @@ export default props => {
{children}
</div>
);
}
};
const { string, any } = PropTypes;
Page.defaultProps = { className: '', children: null };
Page.propTypes = { className: string, title: string.isRequired, children: any };
export default Page;

View file

@ -1,6 +1,6 @@
exports[`AuthenticationPage matches snapshot 1`] = `
<div
className={undefined}>
className="">
<div
className={undefined}>
<a

View file

@ -1,6 +1,6 @@
exports[`CheckoutPage matches snapshot 1`] = `
<div
className={undefined}>
className="">
<div
className={undefined}>
<a

View file

@ -1,6 +1,6 @@
exports[`ContactDetailsPage matches snapshot 1`] = `
<div
className={undefined}>
className="">
<div
className={undefined}>
<a

View file

@ -1,6 +1,6 @@
exports[`ConversationPage matches snapshot 1`] = `
<div
className={undefined}>
className="">
<div
className={undefined}>
<a

View file

@ -1,6 +1,6 @@
exports[`EditProfilePage matches snapshot 1`] = `
<div
className={undefined}>
className="">
<div
className={undefined}>
<a

View file

@ -1,6 +1,6 @@
exports[`InboxPage matches snapshot 1`] = `
<div
className={undefined}>
className="">
<div
className={undefined}>
<a

View file

@ -1,6 +1,6 @@
exports[`LandingPage matches snapshot 1`] = `
<div
className={undefined}>
className="">
<div
className={undefined}>
<a

View file

@ -1,6 +1,6 @@
exports[`ListingPage matches snapshot 1`] = `
<div
className={undefined}>
className="">
<div
className={undefined}>
<a

View file

@ -1,6 +1,6 @@
exports[`ManageListingsPage matches snapshot 1`] = `
<div
className={undefined}>
className="">
<div
className={undefined}>
<a

View file

@ -1,6 +1,6 @@
exports[`NotFoundPage matches snapshot 1`] = `
<div
className={undefined}>
className="">
<div
className={undefined}>
<a

View file

@ -1,6 +1,6 @@
exports[`NotificationSettingsPage matches snapshot 1`] = `
<div
className={undefined}>
className="">
<div
className={undefined}>
<a

View file

@ -1,6 +1,6 @@
exports[`OrderPage matches snapshot 1`] = `
<div
className={undefined}>
className="">
<div
className={undefined}>
<a

View file

@ -1,6 +1,6 @@
exports[`PasswordChangePage matches snapshot 1`] = `
<div
className={undefined}>
className="">
<div
className={undefined}>
<a

View file

@ -1,6 +1,6 @@
exports[`PasswordForgottenPage matches snapshot 1`] = `
<div
className={undefined}>
className="">
<div
className={undefined}>
<a

View file

@ -1,6 +1,6 @@
exports[`PaymentMethodsPage matches snapshot 1`] = `
<div
className={undefined}>
className="">
<div
className={undefined}>
<a

View file

@ -1,6 +1,6 @@
exports[`PayoutPreferencesPage matches snapshot 1`] = `
<div
className={undefined}>
className="">
<div
className={undefined}>
<a

View file

@ -1,6 +1,6 @@
exports[`ProfilePage matches snapshot 1`] = `
<div
className={undefined}>
className="">
<div
className={undefined}>
<a

View file

@ -1,6 +1,6 @@
exports[`SalesConversationPage matches snapshot 1`] = `
<div
className={undefined}>
className="">
<div
className={undefined}>
<a

View file

@ -1,6 +1,6 @@
exports[`SearchPage matches snapshot 1`] = `
<div
className={undefined}>
className="">
<div
className={undefined}>
<a

View file

@ -1,6 +1,6 @@
exports[`SecurityPage matches snapshot 1`] = `
<div
className={undefined}>
className="">
<div
className={undefined}>
<a