2017-03-23 16:27:59 +09:00
|
|
|
import { Components, registerComponent } from 'meteor/vulcan:core';
|
2016-03-27 16:32:29 +09:00
|
|
|
import React, { PropTypes, Component } from 'react';
|
2016-06-10 10:25:38 +09:00
|
|
|
import { FormattedMessage } from 'react-intl';
|
2016-12-08 23:48:16 +01:00
|
|
|
import { Dropdown } from 'react-bootstrap';
|
2017-05-11 11:54:05 +09:00
|
|
|
import { STATES } from 'meteor/vulcan:accounts';
|
2016-03-27 16:32:29 +09:00
|
|
|
|
2017-05-11 11:54:05 +09:00
|
|
|
const UsersAccountMenu = ({state}) =>
|
2016-03-27 16:32:29 +09:00
|
|
|
|
2017-05-11 11:54:05 +09:00
|
|
|
<Dropdown id="accounts-dropdown" className="users-account-menu">
|
|
|
|
<Dropdown.Toggle>
|
|
|
|
<Components.Icon name="user"/>
|
|
|
|
<FormattedMessage id="users.sign_up_log_in"/>
|
|
|
|
</Dropdown.Toggle>
|
|
|
|
<Dropdown.Menu>
|
|
|
|
<Components.AccountsLoginForm formState={state? STATES[state] : STATES.SIGN_UP} />
|
|
|
|
</Dropdown.Menu>
|
|
|
|
</Dropdown>
|
2016-03-27 16:32:29 +09:00
|
|
|
|
2016-05-22 16:42:24 +09:00
|
|
|
UsersAccountMenu.displayName = "UsersAccountMenu";
|
|
|
|
|
2016-12-08 23:48:16 +01:00
|
|
|
registerComponent('UsersAccountMenu', UsersAccountMenu);
|