Repository URL to install this package:
|
Version:
0.1.7 ▾
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import React from 'react';
import { observer } from 'xmobx/mobx-react';
import { sessionContainer } from 'state/session/container';
import { userContainer } from 'src/state/user/container';
import { commonState, container } from './container';
import HeaderAccountLoginLogout from './HeaderAccountLoginLogout';
import { HeaderWrap, Community, ClassesAndEvents } from './_elements';
/**
* @todo clean this up @james
* @TODO probably want to have a mousedown and on click open modal
*/
let HeaderAccount = class HeaderAccount extends React.Component {
/**
* @todo clean this up @james
* @TODO probably want to have a mousedown and on click open modal
*/
constructor() {
super(...arguments);
this.state = commonState;
}
render() {
const { isRegisteredUser } = sessionContainer;
const isSignedInUser = isRegisteredUser || userContainer.username;
return (React.createElement(HeaderWrap, { "aria-expanded": container.isVisible },
React.createElement(Community, { qa: "qa-customer-support" }),
!isSignedInUser && (React.createElement(ClassesAndEvents, { qa: "qa-track-order", onClick: container.handleOrderLookupClick })),
React.createElement(HeaderAccountLoginLogout, null)));
}
};
HeaderAccount = __decorate([
observer
], HeaderAccount);
export default HeaderAccount;
export { HeaderAccount };
//# sourceMappingURL=HeaderAccount.js.map