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 {
|
.content {
|
||||||
max-width: 300px;
|
max-width: 370px;
|
||||||
|
|
||||||
svg,
|
svg,
|
||||||
img {
|
img {
|
||||||
|
|||||||
@ -21,7 +21,7 @@ interface EmptyMessageProps {
|
|||||||
hidden: boolean;
|
hidden: boolean;
|
||||||
blockedBy: boolean;
|
blockedBy: boolean;
|
||||||
accountId?: string;
|
accountId?: string;
|
||||||
withImage?: boolean;
|
withoutAddCollectionButton?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const EmptyMessage: React.FC<EmptyMessageProps> = ({
|
export const EmptyMessage: React.FC<EmptyMessageProps> = ({
|
||||||
@ -29,7 +29,7 @@ export const EmptyMessage: React.FC<EmptyMessageProps> = ({
|
|||||||
suspended,
|
suspended,
|
||||||
hidden,
|
hidden,
|
||||||
blockedBy,
|
blockedBy,
|
||||||
withImage = true,
|
withoutAddCollectionButton,
|
||||||
}) => {
|
}) => {
|
||||||
const { acct } = useParams<{ acct?: string }>();
|
const { acct } = useParams<{ acct?: string }>();
|
||||||
const me = useCurrentAccountId();
|
const me = useCurrentAccountId();
|
||||||
@ -57,7 +57,7 @@ export const EmptyMessage: React.FC<EmptyMessageProps> = ({
|
|||||||
|
|
||||||
const hasCollections = areCollectionsEnabled();
|
const hasCollections = areCollectionsEnabled();
|
||||||
|
|
||||||
const image = withImage && <ElephantImage />;
|
const image = <ElephantImage />;
|
||||||
|
|
||||||
if (me === accountId) {
|
if (me === accountId) {
|
||||||
if (hasCollections) {
|
if (hasCollections) {
|
||||||
@ -78,12 +78,14 @@ export const EmptyMessage: React.FC<EmptyMessageProps> = ({
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Link to='/collections/new' className='button'>
|
{!withoutAddCollectionButton && (
|
||||||
<FormattedMessage
|
<Link to='/collections/new' className='button'>
|
||||||
id='empty_column.account_featured_self.no_collections_button'
|
<FormattedMessage
|
||||||
defaultMessage='Create a collection'
|
id='empty_column.account_featured_self.no_collections_button'
|
||||||
/>
|
defaultMessage='Create a collection'
|
||||||
</Link>
|
/>
|
||||||
|
</Link>
|
||||||
|
)}
|
||||||
<Button secondary onClick={confirmHideFeaturedTab}>
|
<Button secondary onClick={confirmHideFeaturedTab}>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='empty_column.account_featured_self.no_collections_hide_tab'
|
id='empty_column.account_featured_self.no_collections_hide_tab'
|
||||||
|
|||||||
@ -179,7 +179,7 @@ const AccountFeatured: React.FC<{ multiColumn: boolean }> = ({
|
|||||||
</ItemList>
|
</ItemList>
|
||||||
) : (
|
) : (
|
||||||
<EmptyMessage
|
<EmptyMessage
|
||||||
withImage={false}
|
withoutAddCollectionButton
|
||||||
blockedBy={blockedBy}
|
blockedBy={blockedBy}
|
||||||
hidden={hidden}
|
hidden={hidden}
|
||||||
suspended={suspended}
|
suspended={suspended}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user