Fix "New collection" link appearing on other accounts' profiles (#38942)
This commit is contained in:
parent
fcd56d6732
commit
674e2685be
@ -24,6 +24,7 @@ import Column from '@/mastodon/features/ui/components/column';
|
|||||||
import { useAccount } from '@/mastodon/hooks/useAccount';
|
import { useAccount } from '@/mastodon/hooks/useAccount';
|
||||||
import { useAccountId } from '@/mastodon/hooks/useAccountId';
|
import { useAccountId } from '@/mastodon/hooks/useAccountId';
|
||||||
import { useAccountVisibility } from '@/mastodon/hooks/useAccountVisibility';
|
import { useAccountVisibility } from '@/mastodon/hooks/useAccountVisibility';
|
||||||
|
import { me } from '@/mastodon/initial_state';
|
||||||
import { useAppDispatch, useAppSelector } from '@/mastodon/store';
|
import { useAppDispatch, useAppSelector } from '@/mastodon/store';
|
||||||
import AddIcon from '@/material-icons/400-24px/add.svg?react';
|
import AddIcon from '@/material-icons/400-24px/add.svg?react';
|
||||||
|
|
||||||
@ -173,12 +174,14 @@ const AccountFeatured: React.FC<{ multiColumn: boolean }> = ({
|
|||||||
defaultMessage='Collections'
|
defaultMessage='Collections'
|
||||||
/>
|
/>
|
||||||
</h2>
|
</h2>
|
||||||
<SubheadingLink to='/collections/new' icon={AddIcon}>
|
{accountId === me && (
|
||||||
<FormattedMessage
|
<SubheadingLink to='/collections/new' icon={AddIcon}>
|
||||||
id='account.featured.new_collection'
|
<FormattedMessage
|
||||||
defaultMessage='New collection'
|
id='account.featured.new_collection'
|
||||||
/>
|
defaultMessage='New collection'
|
||||||
</SubheadingLink>
|
/>
|
||||||
|
</SubheadingLink>
|
||||||
|
)}
|
||||||
</Subheading>
|
</Subheading>
|
||||||
{hasCollections ? (
|
{hasCollections ? (
|
||||||
<ItemList>
|
<ItemList>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user