Fix spacing
This commit is contained in:
parent
0f29c5673c
commit
e88be5fada
1 changed files with 11 additions and 12 deletions
|
@ -27,6 +27,7 @@ const GroupGallery: React.FC<IGroupGallery> = (props) => {
|
||||||
entities: statuses,
|
entities: statuses,
|
||||||
fetchNextPage,
|
fetchNextPage,
|
||||||
isLoading,
|
isLoading,
|
||||||
|
isFetching,
|
||||||
hasNextPage,
|
hasNextPage,
|
||||||
} = useGroupMedia(groupId);
|
} = useGroupMedia(groupId);
|
||||||
|
|
||||||
|
@ -48,21 +49,25 @@ const GroupGallery: React.FC<IGroupGallery> = (props) => {
|
||||||
|
|
||||||
if (isLoading || groupIsLoading) {
|
if (isLoading || groupIsLoading) {
|
||||||
return (
|
return (
|
||||||
<Column>
|
<Column transparent withHeader={false}>
|
||||||
<Spinner />
|
<div className='pt-6'>
|
||||||
|
<Spinner />
|
||||||
|
</div>
|
||||||
</Column>
|
</Column>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!group) {
|
if (!group) {
|
||||||
return (
|
return (
|
||||||
<MissingIndicator />
|
<div className='pt-6'>
|
||||||
|
<MissingIndicator nested />
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Column label={group.display_name} transparent withHeader={false}>
|
<Column label={group.display_name} transparent withHeader={false}>
|
||||||
<div role='feed' className='grid grid-cols-2 gap-2 sm:grid-cols-3'>
|
<div role='feed' className='mt-4 grid grid-cols-2 gap-2 sm:grid-cols-3'>
|
||||||
{attachments.map((attachment) => (
|
{attachments.map((attachment) => (
|
||||||
<MediaItem
|
<MediaItem
|
||||||
key={`${attachment.status.id}+${attachment.id}`}
|
key={`${attachment.status.id}+${attachment.id}`}
|
||||||
|
@ -76,16 +81,10 @@ const GroupGallery: React.FC<IGroupGallery> = (props) => {
|
||||||
<FormattedMessage id='account_gallery.none' defaultMessage='No media to show.' />
|
<FormattedMessage id='account_gallery.none' defaultMessage='No media to show.' />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{(hasNextPage && !isLoading) && (
|
|
||||||
<LoadMore className='my-auto' visible={!isLoading} onClick={fetchNextPage} />
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{isLoading && (
|
{hasNextPage && (
|
||||||
<div className='slist__append'>
|
<LoadMore className='mt-4' disabled={isFetching} onClick={fetchNextPage} />
|
||||||
<Spinner />
|
|
||||||
</div>
|
|
||||||
)}
|
)}
|
||||||
</Column>
|
</Column>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue