Merge branch 'gallery-load-more' into 'develop'
Fix load more button height on account gallery page See merge request soapbox-pub/soapbox!2318
This commit is contained in:
commit
51524118d4
2 changed files with 5 additions and 4 deletions
|
@ -6,16 +6,17 @@ import { Button } from 'soapbox/components/ui';
|
|||
interface ILoadMore {
|
||||
onClick: React.MouseEventHandler
|
||||
disabled?: boolean
|
||||
visible?: Boolean
|
||||
visible?: boolean
|
||||
className?: string
|
||||
}
|
||||
|
||||
const LoadMore: React.FC<ILoadMore> = ({ onClick, disabled, visible = true }) => {
|
||||
const LoadMore: React.FC<ILoadMore> = ({ onClick, disabled, visible = true, className }) => {
|
||||
if (!visible) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<Button theme='primary' block disabled={disabled || !visible} onClick={onClick}>
|
||||
<Button className={className} theme='primary' block disabled={disabled || !visible} onClick={onClick}>
|
||||
<FormattedMessage id='status.load_more' defaultMessage='Load more' />
|
||||
</Button>
|
||||
);
|
||||
|
|
|
@ -121,7 +121,7 @@ const AccountGallery = () => {
|
|||
let loadOlder = null;
|
||||
|
||||
if (hasMore && !(isLoading && attachments.size === 0)) {
|
||||
loadOlder = <LoadMore visible={!isLoading} onClick={handleLoadOlder} />;
|
||||
loadOlder = <LoadMore className='my-auto' visible={!isLoading} onClick={handleLoadOlder} />;
|
||||
}
|
||||
|
||||
if (unavailable) {
|
||||
|
|
Loading…
Reference in a new issue