Profile redesign: Hide tabs when only activity is available (#38517)
This commit is contained in:
parent
6739967c73
commit
badda51afc
@ -355,8 +355,12 @@ svg.badgeIcon {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tabs {
|
.tabs,
|
||||||
|
.noTabs {
|
||||||
border-bottom: 1px solid var(--color-border-primary);
|
border-bottom: 1px solid var(--color-border-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
padding: 0 24px;
|
padding: 0 24px;
|
||||||
@ -392,6 +396,11 @@ svg.badgeIcon {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.noTabs {
|
||||||
|
width: 100%;
|
||||||
|
border-width: 0 0 1px;
|
||||||
|
}
|
||||||
|
|
||||||
.bannerBase {
|
.bannerBase {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
|
|||||||
@ -19,10 +19,13 @@ export const AccountTabs: FC = () => {
|
|||||||
const account = useAccount(accountId);
|
const account = useAccount(accountId);
|
||||||
|
|
||||||
if (!account) {
|
if (!account) {
|
||||||
return null;
|
return <hr className={classes.noTabs} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { acct, show_featured, show_media } = account;
|
const { acct, show_featured, show_media } = account;
|
||||||
|
if (!show_featured && !show_media) {
|
||||||
|
return <hr className={classes.noTabs} />;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={classes.tabs}>
|
<div className={classes.tabs}>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user