More design tweaks for empty state in Featured tab > Collections (#38626)
This commit is contained in:
parent
f429019f34
commit
ef4a583f54
@ -10,7 +10,7 @@
|
||||
}
|
||||
|
||||
.content {
|
||||
max-width: 300px;
|
||||
max-width: 370px;
|
||||
|
||||
svg,
|
||||
img {
|
||||
|
||||
@ -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'
|
||||
|
||||
@ -179,7 +179,7 @@ const AccountFeatured: React.FC<{ multiColumn: boolean }> = ({
|
||||
</ItemList>
|
||||
) : (
|
||||
<EmptyMessage
|
||||
withImage={false}
|
||||
withoutAddCollectionButton
|
||||
blockedBy={blockedBy}
|
||||
hidden={hidden}
|
||||
suspended={suspended}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user