mirror of
https://github.com/wassname/talk.git
synced 2026-07-05 21:43:08 +08:00
fixed proptype missing validation
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user