mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 01:51:40 -05:00
more ES6 classes & functional stateless components refactoring
This commit is contained in:
parent
3169989bc0
commit
d3e0f8c69b
20 changed files with 165 additions and 173 deletions
|
@ -1,11 +1,14 @@
|
||||||
|
import React, { PropTypes, Component } from 'react';
|
||||||
|
|
||||||
import Core from "meteor/nova:core";
|
import Core from "meteor/nova:core";
|
||||||
|
|
||||||
const Messages = Core.Messages;
|
const Messages = Core.Messages;
|
||||||
|
|
||||||
const Flash = React.createClass({
|
class Flash extends Component{
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
Messages.markAsSeen(this.props.message._id);
|
Messages.markAsSeen(this.props.message._id);
|
||||||
},
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
|
@ -14,6 +17,6 @@ const Flash = React.createClass({
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
|
||||||
module.exports = Flash;
|
module.exports = Flash;
|
|
@ -1,7 +1,7 @@
|
||||||
import NoSSR from 'react-no-ssr';
|
import NoSSR from 'react-no-ssr';
|
||||||
|
|
||||||
|
|
||||||
const Header = props => {
|
const Header = ({currentUser}) => {
|
||||||
|
|
||||||
({Logo, ListContainer, CategoriesList, FlashContainer, ModalButton, NewDocContainer, CanCreatePost} = Telescope.components);
|
({Logo, ListContainer, CategoriesList, FlashContainer, ModalButton, NewDocContainer, CanCreatePost} = Telescope.components);
|
||||||
|
|
||||||
|
@ -21,9 +21,9 @@ const Header = props => {
|
||||||
|
|
||||||
<LogInButtons />
|
<LogInButtons />
|
||||||
|
|
||||||
{props.currentUser ? <p><a href={FlowRouter.path("account")}>My Account</a></p> : ""}
|
{currentUser ? <p><a href={FlowRouter.path("account")}>My Account</a></p> : ""}
|
||||||
|
|
||||||
<CanCreatePost user={props.currentUser}>
|
<CanCreatePost user={currentUser}>
|
||||||
<ModalButton label="New Post" className="button button--primary">
|
<ModalButton label="New Post" className="button button--primary">
|
||||||
<NewDocContainer collection={Posts} label="New Post" methodName="posts.new" callback={(post)=>{FlowRouter.go('posts.single', post);}}/>
|
<NewDocContainer collection={Posts} label="New Post" methodName="posts.new" callback={(post)=>{FlowRouter.go('posts.single', post);}}/>
|
||||||
</ModalButton>
|
</ModalButton>
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
const Layout = props => {
|
const Layout = props => {
|
||||||
|
|
||||||
const Header = Telescope.getComponent("Header");
|
({Header, Footer} = Telescope.components);
|
||||||
const Footer = Telescope.getComponent("Footer");
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="wrapper" id="wrapper">
|
<div className="wrapper" id="wrapper">
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
const Logo = props => {
|
const Logo = ({logoUrl, siteTitle}) => {
|
||||||
if (props.logoUrl) {
|
if (logoUrl) {
|
||||||
return (
|
return (
|
||||||
<h1 className="logo-image ">
|
<h1 className="logo-image ">
|
||||||
<a href="/">
|
<a href="/">
|
||||||
<img src={props.logoUrl} alt={props.siteTitle} style={{maxWidth: "100px", maxHeight: "100px"}} />
|
<img src={logoUrl} alt={siteTitle} style={{maxWidth: "100px", maxHeight: "100px"}} />
|
||||||
</a>
|
</a>
|
||||||
</h1>
|
</h1>
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
<h1 className="logo-text"><a href="/">{props.siteTitle}</a></h1>
|
<h1 className="logo-text"><a href="/">{siteTitle}</a></h1>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,19 +1,15 @@
|
||||||
const CanCreatePost = React.createClass({
|
const CanCreatePost = ({user, children}) => {
|
||||||
|
if (!user){
|
||||||
propTypes: {
|
return <p>Please log in.</p>;
|
||||||
user: React.PropTypes.object
|
} else if (Users.can.post(user)) {
|
||||||
},
|
return children;
|
||||||
|
} else {
|
||||||
render() {
|
return <p>Sorry, you do not have permissions to post at this time</p>;
|
||||||
if (!this.props.user){
|
|
||||||
return <p>Please log in.</p>;
|
|
||||||
} else if (Users.can.post(this.props.user)) {
|
|
||||||
return this.props.children;
|
|
||||||
} else {
|
|
||||||
return <p>Sorry, you do not have permissions to post at this time</p>;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
});
|
CanCreatePost.propTypes = {
|
||||||
|
user: React.PropTypes.object
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = CanCreatePost;
|
module.exports = CanCreatePost;
|
|
@ -1,20 +1,16 @@
|
||||||
const CanEditPost = React.createClass({
|
const CanEditPost = ({user, post, children}) => {
|
||||||
|
if (Users.can.edit(user, post)) {
|
||||||
propTypes: {
|
return children;
|
||||||
user: React.PropTypes.object,
|
} else if (!user){
|
||||||
post: React.PropTypes.object
|
return <p>Please log in.</p>;
|
||||||
},
|
} else {
|
||||||
|
return <p>Sorry, you do not have permissions to edit this post at this time</p>;
|
||||||
render() {
|
|
||||||
if (Users.can.edit(this.props.user, this.props.post)) {
|
|
||||||
return this.props.children;
|
|
||||||
} else if (!this.props.user){
|
|
||||||
return <p>Please log in.</p>;
|
|
||||||
} else {
|
|
||||||
return <p>Sorry, you do not have permissions to edit this post at this time</p>;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
});
|
CanEditPost.propTypes = {
|
||||||
|
user: React.PropTypes.object,
|
||||||
|
post: React.PropTypes.object
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = CanEditPost;
|
module.exports = CanEditPost;
|
|
@ -1,20 +1,16 @@
|
||||||
const CanEditUser = React.createClass({
|
const CanEditUser = ({user, userToEdit, children}) => {
|
||||||
|
if (!user){
|
||||||
propTypes: {
|
return <p>Please log in.</p>;
|
||||||
user: React.PropTypes.object,
|
} else if (Users.can.edit(user, userToEdit)) {
|
||||||
userToEdit: React.PropTypes.object
|
return children;
|
||||||
},
|
} else {
|
||||||
|
return <p>Sorry, you do not have permissions to edit this user at this time</p>;
|
||||||
render() {
|
|
||||||
if (!this.props.user){
|
|
||||||
return <p>Please log in.</p>;
|
|
||||||
} else if (Users.can.edit(this.props.user, this.props.userToEdit)) {
|
|
||||||
return this.props.children;
|
|
||||||
} else {
|
|
||||||
return <p>Sorry, you do not have permissions to edit this user at this time</p>;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
});
|
CanEditUser.propTypes = {
|
||||||
|
user: React.PropTypes.object,
|
||||||
|
userToEdit: React.PropTypes.object
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = CanEditUser;
|
module.exports = CanEditUser;
|
|
@ -1,19 +1,15 @@
|
||||||
const CanView = React.createClass({
|
const CanView = ({user, children}) => {
|
||||||
|
if (Users.can.view(user)) {
|
||||||
propTypes: {
|
return children;
|
||||||
user: React.PropTypes.object
|
} else if (!user){
|
||||||
},
|
return <p>Please log in.</p>;
|
||||||
|
} else {
|
||||||
render() {
|
return <p>Sorry, you do not have permissions to post at this time</p>;
|
||||||
if (Users.can.view(this.props.user)) {
|
|
||||||
return this.props.children;
|
|
||||||
} else if (!this.props.user){
|
|
||||||
return <p>Please log in.</p>;
|
|
||||||
} else {
|
|
||||||
return <p>Sorry, you do not have permissions to post at this time</p>;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
});
|
CanView.propTypes = {
|
||||||
|
user: React.PropTypes.object
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = CanView;
|
module.exports = CanView;
|
|
@ -1,20 +1,16 @@
|
||||||
const CanViewPost = React.createClass({
|
const CanViewPost = ({user, post, children}) => {
|
||||||
|
if (Users.can.viewPost(this.props.user, this.props.document)) {
|
||||||
propTypes: {
|
return this.props.children;
|
||||||
user: React.PropTypes.object,
|
} else if (!this.props.user){
|
||||||
post: React.PropTypes.object
|
return <p>Please log in.</p>;
|
||||||
},
|
} else {
|
||||||
|
return <p>Sorry, you do not have permissions to post at this time</p>;
|
||||||
render() {
|
|
||||||
if (Users.can.viewPost(this.props.user, this.props.document)) {
|
|
||||||
return this.props.children;
|
|
||||||
} else if (!this.props.user){
|
|
||||||
return <p>Please log in.</p>;
|
|
||||||
} else {
|
|
||||||
return <p>Sorry, you do not have permissions to post at this time</p>;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
});
|
CanViewPost.propTypes = {
|
||||||
|
user: React.PropTypes.object,
|
||||||
|
post: React.PropTypes.object
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = CanViewPost;
|
module.exports = CanViewPost;
|
|
@ -1,8 +1,8 @@
|
||||||
const Post = (props) => {
|
const Post = ({document}) => {
|
||||||
|
|
||||||
({ListContainer, CommentList, CommentNew, PostCategories, SocialShare} = Telescope.components);
|
({ListContainer, CommentList, CommentNew, PostCategories, SocialShare} = Telescope.components);
|
||||||
|
|
||||||
const post = props.document;
|
const post = document;
|
||||||
const htmlBody = {__html: post.htmlBody};
|
const htmlBody = {__html: post.htmlBody};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
const PostCategories = props => {
|
const PostCategories = ({categories}) => {
|
||||||
return (
|
return (
|
||||||
<div className="post-categories">
|
<div className="post-categories">
|
||||||
<h4>Categories</h4>
|
<h4>Categories</h4>
|
||||||
<ul>
|
<ul>
|
||||||
{props.categories.map(category => <li key={category._id}><a href={FlowRouter.path("posts.list", {}, {cat: category.slug})}>{category.name}</a></li>)}
|
{categories.map(category => <li key={category._id}><a href={FlowRouter.path("posts.list", {}, {cat: category.slug})}>{category.name}</a></li>)}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
const PostCommenters = props => {
|
const PostCommenters = ({commenters}) => {
|
||||||
return (
|
return (
|
||||||
<div className="post-commenters">
|
<div className="post-commenters">
|
||||||
<h4>Comments by</h4>
|
<h4>Comments by</h4>
|
||||||
<ul>
|
<ul>
|
||||||
{props.commenters.map(commenter => <li key={commenter._id}>{Users.getDisplayName(commenter)}</li>)}
|
{commenters.map(commenter => <li key={commenter._id}>{Users.getDisplayName(commenter)}</li>)}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,23 +1,20 @@
|
||||||
const PostItem = React.createClass({
|
import React, { PropTypes, Component } from 'react';
|
||||||
|
|
||||||
propTypes: {
|
class PostItem extends Component {
|
||||||
post: React.PropTypes.object.isRequired, // the current comment
|
|
||||||
currentUser: React.PropTypes.object, // the current user
|
|
||||||
},
|
|
||||||
|
|
||||||
renderCategories() {
|
renderCategories() {
|
||||||
|
|
||||||
({PostCategories} = Telescope.components);
|
({PostCategories} = Telescope.components);
|
||||||
|
|
||||||
return this.props.post.categoriesArray ? <PostCategories categories={this.props.post.categoriesArray} /> : "";
|
return this.props.post.categoriesArray ? <PostCategories categories={this.props.post.categoriesArray} /> : "";
|
||||||
},
|
}
|
||||||
|
|
||||||
renderCommenters() {
|
renderCommenters() {
|
||||||
|
|
||||||
({PostCommenters} = Telescope.components);
|
({PostCommenters} = Telescope.components);
|
||||||
|
|
||||||
return this.props.post.commentersArray ? <PostCommenters commenters={this.props.post.commentersArray}/> : "";
|
return this.props.post.commentersArray ? <PostCommenters commenters={this.props.post.commentersArray}/> : "";
|
||||||
},
|
}
|
||||||
|
|
||||||
renderActions() {
|
renderActions() {
|
||||||
|
|
||||||
|
@ -34,7 +31,7 @@ const PostItem = React.createClass({
|
||||||
{Users.can.edit(this.props.currentUser, this.props.post) ? component : ""}
|
{Users.can.edit(this.props.currentUser, this.props.post) ? component : ""}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
},
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
||||||
|
@ -53,6 +50,11 @@ const PostItem = React.createClass({
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
|
|
||||||
|
PostItem.propTypes = {
|
||||||
|
post: React.PropTypes.object.isRequired, // the current comment
|
||||||
|
currentUser: React.PropTypes.object, // the current user
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = PostItem;
|
module.exports = PostItem;
|
|
@ -1,18 +1,18 @@
|
||||||
const PostList = props => {
|
const PostList = ({results, currentUser, hasMore, ready, count, totalCount, loadMore}) => {
|
||||||
|
|
||||||
({PostItem, LoadMore, PostsLoading, NoPosts, NoMorePosts, PostViews} = Telescope.components);
|
({PostItem, LoadMore, PostsLoading, NoPosts, NoMorePosts, PostViews} = Telescope.components);
|
||||||
|
|
||||||
if (!!props.results.length) {
|
if (!!results.length) {
|
||||||
return (
|
return (
|
||||||
<div className="postList">
|
<div className="postList">
|
||||||
<PostViews />
|
<PostViews />
|
||||||
<div className="post-list-content">
|
<div className="post-list-content">
|
||||||
{props.results.map(post => <PostItem post={post} currentUser={props.currentUser} key={post._id}/>)}
|
{results.map(post => <PostItem post={post} currentUser={currentUser} key={post._id}/>)}
|
||||||
</div>
|
</div>
|
||||||
{props.hasMore ? (props.ready ? <LoadMore {...props}/> : <PostsLoading/>) : <NoMorePosts/>}
|
{hasMore ? (ready ? <LoadMore loadMore={loadMore} count={count} totalCount={totalCount} /> : <PostsLoading/>) : <NoMorePosts/>}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
} else if (!props.ready) {
|
} else if (!ready) {
|
||||||
return (
|
return (
|
||||||
<div className="postList">
|
<div className="postList">
|
||||||
<PostViews />
|
<PostViews />
|
||||||
|
|
|
@ -1,23 +1,20 @@
|
||||||
const UsersEdit = React.createClass({
|
const UsersEdit = ({document, currentUser}) => {
|
||||||
|
|
||||||
|
const user = this.props.document;
|
||||||
|
const label = `Edit profile for ${Users.getDisplayName(user)}`;
|
||||||
|
|
||||||
|
({CanEditUser, EditDocContainer} = Telescope.components);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<CanEditUser user={this.props.currentUser} userToEdit={user}>
|
||||||
|
<EditDocContainer collection={Meteor.users} document={user} label={label} methodName="users.edit"/>
|
||||||
|
</CanEditUser>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
propTypes: {
|
UsersEdit.propTypes = {
|
||||||
document: React.PropTypes.object.isRequired,
|
document: React.PropTypes.object.isRequired,
|
||||||
currentUser: React.PropTypes.object.isRequired
|
currentUser: React.PropTypes.object.isRequired
|
||||||
},
|
}
|
||||||
|
|
||||||
render() {
|
|
||||||
|
|
||||||
const user = this.props.document;
|
|
||||||
const label = `Edit profile for ${Users.getDisplayName(user)}`;
|
|
||||||
|
|
||||||
({CanEditUser, EditDocContainer} = Telescope.components);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<CanEditUser user={this.props.currentUser} userToEdit={user}>
|
|
||||||
<EditDocContainer collection={Meteor.users} document={user} label={label} methodName="users.edit"/>
|
|
||||||
</CanEditUser>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
module.exports = UsersEdit;
|
module.exports = UsersEdit;
|
|
@ -1,18 +1,13 @@
|
||||||
const UsersSingle = React.createClass({
|
const UsersSingle = ({document, currentUser}) => {
|
||||||
|
const user = document;
|
||||||
propTypes: {
|
return (
|
||||||
document: React.PropTypes.object.isRequired,
|
<p>Profile for {Users.getDisplayName(user)}</p>
|
||||||
currentUser: React.PropTypes.object.isRequired
|
)
|
||||||
},
|
}
|
||||||
|
|
||||||
render() {
|
UsersSingle.propTypes = {
|
||||||
|
document: React.PropTypes.object.isRequired,
|
||||||
const user = this.props.document;
|
currentUser: React.PropTypes.object.isRequired
|
||||||
|
}
|
||||||
return (
|
|
||||||
<p>Profile for {Users.getDisplayName(user)}</p>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
module.exports = UsersSingle;
|
module.exports = UsersSingle;
|
|
@ -1,3 +1,5 @@
|
||||||
|
import React, { PropTypes, Component } from 'react';
|
||||||
|
|
||||||
import Modal from 'react-modal';
|
import Modal from 'react-modal';
|
||||||
|
|
||||||
const customStyles = {
|
const customStyles = {
|
||||||
|
@ -11,29 +13,29 @@ const customStyles = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const ModalButton = React.createClass({
|
class ModalButton extends Component {
|
||||||
|
|
||||||
propTypes: {
|
constructor() {
|
||||||
label: React.PropTypes.string.isRequired,
|
super();
|
||||||
className: React.PropTypes.string
|
this.openModal = this.openModal.bind(this);
|
||||||
},
|
this.closeModal = this.closeModal.bind(this);
|
||||||
|
this.state = {
|
||||||
|
modalIsOpen: false
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
getInitialState: function() {
|
openModal(event) {
|
||||||
return { modalIsOpen: false };
|
|
||||||
},
|
|
||||||
|
|
||||||
openModal: function(event) {
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
this.setState({modalIsOpen: true});
|
this.setState({modalIsOpen: true});
|
||||||
},
|
}
|
||||||
|
|
||||||
closeModal: function() {
|
closeModal(event) {
|
||||||
|
event.preventDefault();
|
||||||
this.setState({modalIsOpen: false});
|
this.setState({modalIsOpen: false});
|
||||||
},
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
||||||
// ({PostNewContainer} = Telescope.components);
|
|
||||||
const Component = this.props.component;
|
const Component = this.props.component;
|
||||||
|
|
||||||
// see http://stackoverflow.com/a/32371612/649299
|
// see http://stackoverflow.com/a/32371612/649299
|
||||||
|
@ -69,7 +71,12 @@ const ModalButton = React.createClass({
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
|
|
||||||
|
ModalButton.propTypes = {
|
||||||
|
label: React.PropTypes.string.isRequired,
|
||||||
|
className: React.PropTypes.string
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = ModalButton;
|
module.exports = ModalButton;
|
||||||
export default ModalButton;
|
export default ModalButton;
|
|
@ -1,3 +1,5 @@
|
||||||
|
import React, { PropTypes, Component } from 'react';
|
||||||
|
|
||||||
const AppContainer = React.createClass({
|
const AppContainer = React.createClass({
|
||||||
|
|
||||||
mixins: [ReactMeteorData],
|
mixins: [ReactMeteorData],
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
import NoSSR from 'react-no-ssr';
|
import NoSSR from 'react-no-ssr';
|
||||||
|
|
||||||
import Core from 'meteor/nova:core';
|
import Core from 'meteor/nova:core';
|
||||||
|
|
|
@ -1,28 +1,29 @@
|
||||||
const SocialShare = React.createClass({
|
import React, { PropTypes, Component } from 'react';
|
||||||
|
|
||||||
propTypes: {
|
class SocialShare extends Component {
|
||||||
url: React.PropTypes.string.isRequired,
|
|
||||||
title: React.PropTypes.string.isRequired,
|
|
||||||
},
|
|
||||||
|
|
||||||
getInitialState: function() {
|
constructor() {
|
||||||
return {showShare: false};
|
super();
|
||||||
},
|
this.toggleView = this.toggleView.bind(this);
|
||||||
|
this.state = {
|
||||||
|
showShare: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
viaTwitter() {
|
viaTwitter() {
|
||||||
return !!Settings.get('twitterAccount') ? 'via='+Settings.get('twitterAccount') : '';
|
return !!Settings.get('twitterAccount') ? 'via='+Settings.get('twitterAccount') : '';
|
||||||
},
|
}
|
||||||
|
|
||||||
toggleView() {
|
toggleView() {
|
||||||
this.setState({
|
this.setState({
|
||||||
showShare: !this.state.showShare
|
showShare: !this.state.showShare
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
},
|
}
|
||||||
|
|
||||||
insertIcon(name) {
|
insertIcon(name) {
|
||||||
return {__html: Telescope.utils.getIcon(name)};
|
return {__html: Telescope.utils.getIcon(name)};
|
||||||
},
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
let shareDisplay = this.state.showShare ? 'active' : 'hidden';
|
let shareDisplay = this.state.showShare ? 'active' : 'hidden';
|
||||||
|
@ -38,6 +39,11 @@ const SocialShare = React.createClass({
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
|
||||||
|
SocialShare.propTypes = {
|
||||||
|
url: React.PropTypes.string.isRequired,
|
||||||
|
title: React.PropTypes.string.isRequired,
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = SocialShare;
|
module.exports = SocialShare;
|
||||||
|
|
Loading…
Add table
Reference in a new issue