[Glitch] Profile redesign: Hide tabs when only activity is available

Port badda51afc2eb4a93fba0fc57dad49963fe8f172 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Echo 2026-04-02 11:07:21 +02:00 committed by Claire
parent 45bd1ca785
commit 9f6d2fd0f0
2 changed files with 14 additions and 2 deletions

View File

@ -355,8 +355,12 @@ svg.badgeIcon {
}
}
.tabs {
.tabs,
.noTabs {
border-bottom: 1px solid var(--color-border-primary);
}
.tabs {
display: flex;
gap: 12px;
padding: 0 24px;
@ -392,6 +396,11 @@ svg.badgeIcon {
}
}
.noTabs {
width: 100%;
border-width: 0 0 1px;
}
.bannerBase {
box-sizing: border-box;
padding: 16px;

View File

@ -19,10 +19,13 @@ export const AccountTabs: FC = () => {
const account = useAccount(accountId);
if (!account) {
return null;
return <hr className={classes.noTabs} />;
}
const { acct, show_featured, show_media } = account;
if (!show_featured && !show_media) {
return <hr className={classes.noTabs} />;
}
return (
<div className={classes.tabs}>