[Glitch] Fix accounts not visible in collection editor in advanced web interface
Port c60fa47e464f6d13825f32162f447ddca9b8f200 to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
3083fdad1f
commit
695371f591
@ -27,7 +27,6 @@ import {
|
|||||||
import {
|
import {
|
||||||
Article,
|
Article,
|
||||||
ItemList,
|
ItemList,
|
||||||
Scrollable,
|
|
||||||
} from 'flavours/glitch/components/scrollable_list/components';
|
} from 'flavours/glitch/components/scrollable_list/components';
|
||||||
import { useAccount } from 'flavours/glitch/hooks/useAccount';
|
import { useAccount } from 'flavours/glitch/hooks/useAccount';
|
||||||
import { useSearchAccounts } from 'flavours/glitch/hooks/useSearchAccounts';
|
import { useSearchAccounts } from 'flavours/glitch/hooks/useSearchAccounts';
|
||||||
@ -420,43 +419,42 @@ export const CollectionAccounts: React.FC<{
|
|||||||
</AccountsHeadingElement>
|
</AccountsHeadingElement>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<Scrollable className={classes.scrollableWrapper}>
|
<ItemList
|
||||||
<ItemList
|
className={classes.accountList}
|
||||||
emptyMessage={
|
emptyMessage={
|
||||||
<EmptyState
|
<EmptyState
|
||||||
title={
|
title={
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='collections.accounts.empty_editor_title'
|
id='collections.accounts.empty_editor_title'
|
||||||
defaultMessage='No one is in this collection yet'
|
defaultMessage='No one is in this collection yet'
|
||||||
/>
|
|
||||||
}
|
|
||||||
message={
|
|
||||||
<FormattedMessage
|
|
||||||
id='collections.accounts.empty_description'
|
|
||||||
defaultMessage='Add up to {count} accounts'
|
|
||||||
values={{
|
|
||||||
count: MAX_COLLECTION_ACCOUNT_COUNT,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
>
|
|
||||||
{editorItems.map(({ account_id, state }, index) => (
|
|
||||||
<Article
|
|
||||||
key={account_id}
|
|
||||||
aria-posinset={index}
|
|
||||||
aria-setsize={editorItems.length}
|
|
||||||
>
|
|
||||||
<AddedAccountItem
|
|
||||||
accountId={account_id}
|
|
||||||
pending={state === 'pending'}
|
|
||||||
onRemove={handleRemoveAccountItem}
|
|
||||||
/>
|
/>
|
||||||
</Article>
|
}
|
||||||
))}
|
message={
|
||||||
</ItemList>
|
<FormattedMessage
|
||||||
</Scrollable>
|
id='collections.accounts.empty_description'
|
||||||
|
defaultMessage='Add up to {count} accounts'
|
||||||
|
values={{
|
||||||
|
count: MAX_COLLECTION_ACCOUNT_COUNT,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{editorItems.map(({ account_id, state }, index) => (
|
||||||
|
<Article
|
||||||
|
key={account_id}
|
||||||
|
aria-posinset={index}
|
||||||
|
aria-setsize={editorItems.length}
|
||||||
|
>
|
||||||
|
<AddedAccountItem
|
||||||
|
accountId={account_id}
|
||||||
|
pending={state === 'pending'}
|
||||||
|
onRemove={handleRemoveAccountItem}
|
||||||
|
/>
|
||||||
|
</Article>
|
||||||
|
))}
|
||||||
|
</ItemList>
|
||||||
</div>
|
</div>
|
||||||
</FormStack>
|
</FormStack>
|
||||||
{!isEditMode && hasItems && (
|
{!isEditMode && hasItems && (
|
||||||
|
|||||||
@ -55,7 +55,7 @@
|
|||||||
gap: 16px;
|
gap: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scrollableWrapper {
|
.accountList {
|
||||||
margin-inline: -16px;
|
margin-inline: -16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user