[Glitch] Fix "New collection" link appearing on other accounts' profiles
Port 674e2685be97fbe2836179a269e7a69fc6347d00 to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
64165beda2
commit
87d61a280e
@ -24,6 +24,7 @@ import Column from '@/flavours/glitch/features/ui/components/column';
|
|||||||
import { useAccount } from '@/flavours/glitch/hooks/useAccount';
|
import { useAccount } from '@/flavours/glitch/hooks/useAccount';
|
||||||
import { useAccountId } from '@/flavours/glitch/hooks/useAccountId';
|
import { useAccountId } from '@/flavours/glitch/hooks/useAccountId';
|
||||||
import { useAccountVisibility } from '@/flavours/glitch/hooks/useAccountVisibility';
|
import { useAccountVisibility } from '@/flavours/glitch/hooks/useAccountVisibility';
|
||||||
|
import { me } from '@/flavours/glitch/initial_state';
|
||||||
import { useAppDispatch, useAppSelector } from '@/flavours/glitch/store';
|
import { useAppDispatch, useAppSelector } from '@/flavours/glitch/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