Vulcan/packages/nova-base-components/lib/users/UsersAccount.jsx

17 lines
611 B
React
Raw Normal View History

import { Components, registerComponent, withCurrentUser } from 'meteor/nova:core';
2016-06-11 16:36:18 +09:00
import React from 'react';
const UsersAccount = (props, context) => {
// note: terms is as the same as a document-shape the SmartForm edit-mode expects to receive
const terms = props.params.slug ? {slug: props.params.slug} : props.currentUser ? {documentId: props.currentUser._id } : {};
return <Components.UsersEditForm terms={terms} />
2016-06-11 16:36:18 +09:00
};
2016-11-15 18:33:16 +01:00
UsersAccount.propTypes = {
2016-06-11 16:36:18 +09:00
currentUser: React.PropTypes.object
2016-11-15 18:33:16 +01:00
};
2016-06-11 16:36:18 +09:00
UsersAccount.displayName = "UsersAccount";
2016-06-11 16:36:18 +09:00
registerComponent('UsersAccount', UsersAccount, withCurrentUser);