pl-fe: allow accessing 'load more' button with hotkeys

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk
2025-10-31 11:02:41 +01:00
parent 83d2bc1073
commit e1986fb670
11 changed files with 25 additions and 14 deletions

View File

@ -1,8 +1,7 @@
import { clsx } from 'clsx';
import React from 'react';
import { FormattedMessage } from 'react-intl';
import Button from 'pl-fe/components/ui/button';
interface ILoadMore {
onClick: React.MouseEventHandler;
disabled?: boolean;
@ -16,9 +15,9 @@ const LoadMore: React.FC<ILoadMore> = ({ onClick, disabled, visible = true, clas
}
return (
<Button className={className} theme='primary' block disabled={disabled || !visible} onClick={onClick}>
<button className={clsx('⁂-load-more', className)} disabled={disabled || !visible} onClick={onClick}>
<FormattedMessage id='status.load_more' defaultMessage='Load more' />
</Button>
</button>
);
};

View File

@ -71,7 +71,7 @@ const StatusList: React.FC<IStatusList> = ({
const handleMoveDown = (id: string, featured: boolean = false) => {
const elementIndex = getCurrentStatusIndex(id, featured) + 1;
selectChild(elementIndex, node, document.getElementById('status-list') || undefined);
selectChild(elementIndex, node, document.getElementById('status-list') || undefined, scrollableContent.length);
};
const handleLoadOlder = useCallback(debounce(() => {