More design tweaks for empty state in Featured tab > Collections (#38626)

This commit is contained in:
diondiondion 2026-04-09 16:37:39 +02:00 committed by GitHub
parent f429019f34
commit ef4a583f54
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 13 additions and 11 deletions

View File

@ -10,7 +10,7 @@
}
.content {
max-width: 300px;
max-width: 370px;
svg,
img {

View File

@ -21,7 +21,7 @@ interface EmptyMessageProps {
hidden: boolean;
blockedBy: boolean;
accountId?: string;
withImage?: boolean;
withoutAddCollectionButton?: boolean;
}
export const EmptyMessage: React.FC<EmptyMessageProps> = ({
@ -29,7 +29,7 @@ export const EmptyMessage: React.FC<EmptyMessageProps> = ({
suspended,
hidden,
blockedBy,
withImage = true,
withoutAddCollectionButton,
}) => {
const { acct } = useParams<{ acct?: string }>();
const me = useCurrentAccountId();
@ -57,7 +57,7 @@ export const EmptyMessage: React.FC<EmptyMessageProps> = ({
const hasCollections = areCollectionsEnabled();
const image = withImage && <ElephantImage />;
const image = <ElephantImage />;
if (me === accountId) {
if (hasCollections) {
@ -78,12 +78,14 @@ export const EmptyMessage: React.FC<EmptyMessageProps> = ({
/>
}
>
<Link to='/collections/new' className='button'>
<FormattedMessage
id='empty_column.account_featured_self.no_collections_button'
defaultMessage='Create a collection'
/>
</Link>
{!withoutAddCollectionButton && (
<Link to='/collections/new' className='button'>
<FormattedMessage
id='empty_column.account_featured_self.no_collections_button'
defaultMessage='Create a collection'
/>
</Link>
)}
<Button secondary onClick={confirmHideFeaturedTab}>
<FormattedMessage
id='empty_column.account_featured_self.no_collections_hide_tab'

View File

@ -179,7 +179,7 @@ const AccountFeatured: React.FC<{ multiColumn: boolean }> = ({
</ItemList>
) : (
<EmptyMessage
withImage={false}
withoutAddCollectionButton
blockedBy={blockedBy}
hidden={hidden}
suspended={suspended}