fixed proptype missing validation

This commit is contained in:
Wyatt Johnson
2018-04-17 13:19:03 -06:00
parent ec54db58dd
commit a6344d8e71
@@ -16,8 +16,6 @@ import cn from 'classnames';
export default class Embed extends React.Component {
getTabs() {
if (!this.props.currentUser) return false;
const tabs = [
<Tab
key="stream"
@@ -26,14 +24,20 @@ export default class Embed extends React.Component {
>
{t('embed_comments_tab')}
</Tab>,
<Tab
key="profile"
tabId="profile"
className="talk-embed-stream-profile-tab"
>
{t('framework.my_profile')}
</Tab>,
];
if (this.props.currentUser) {
tabs.push(
<Tab
key="profile"
tabId="profile"
className="talk-embed-stream-profile-tab"
>
{t('framework.my_profile')}
</Tab>
);
}
if (can(this.props.currentUser, 'UPDATE_ASSET_CONFIG')) {
tabs.push(
<Tab
@@ -45,6 +49,7 @@ export default class Embed extends React.Component {
</Tab>
);
}
return tabs;
}