2017-03-23 16:27:59 +09:00
|
|
|
import { Components, registerComponent, withCurrentUser } from 'meteor/vulcan:core';
|
2016-06-11 16:36:18 +09:00
|
|
|
import React from 'react';
|
|
|
|
|
|
|
|
const UsersAccount = (props, context) => {
|
2017-01-17 19:46:17 +01:00
|
|
|
// 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
|
|
|
|
2016-07-18 17:59:47 +02:00
|
|
|
UsersAccount.displayName = "UsersAccount";
|
2016-06-11 16:36:18 +09:00
|
|
|
|
2017-01-17 19:46:17 +01:00
|
|
|
registerComponent('UsersAccount', UsersAccount, withCurrentUser);
|