mirror of
https://github.com/wassname/talk.git
synced 2026-08-01 13:00:55 +08:00
don't show profile tab if user is logged out
This commit is contained in:
@@ -16,6 +16,8 @@ import cn from 'classnames';
|
||||
|
||||
export default class Embed extends React.Component {
|
||||
getTabs() {
|
||||
if (!this.props.currentUser) return false;
|
||||
|
||||
const tabs = [
|
||||
<Tab
|
||||
key="stream"
|
||||
|
||||
@@ -16,9 +16,11 @@ class ExtendableTabPanel extends React.Component {
|
||||
} = this.props;
|
||||
return (
|
||||
<div {...rest}>
|
||||
<TabBar activeTab={activeTab} onTabClick={setActiveTab} sub={sub}>
|
||||
{tabs}
|
||||
</TabBar>
|
||||
{tabs && (
|
||||
<TabBar activeTab={activeTab} onTabClick={setActiveTab} sub={sub}>
|
||||
{tabs}
|
||||
</TabBar>
|
||||
)}
|
||||
{loading ? (
|
||||
<div className={styles.spinnerContainer}>
|
||||
<Spinner />
|
||||
|
||||
Reference in New Issue
Block a user