[Glitch] Rewrite <LoadPending /> as FC and TS

Port dfaf59d99a to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
alfe
2023-06-11 11:47:18 +09:00
committed by Claire
parent f815bd5fd9
commit cdec45eca9
3 changed files with 19 additions and 24 deletions

View File

@ -0,0 +1,18 @@
import { FormattedMessage } from 'react-intl';
interface Props {
onClick: (event: React.MouseEvent) => void;
count: number;
}
export const LoadPending: React.FC<Props> = ({ onClick, count }) => {
return (
<button className='load-more load-gap' onClick={onClick}>
<FormattedMessage
id='load_pending'
defaultMessage='{count, plural, one {# new item} other {# new items}}'
values={{ count }}
/>
</button>
);
};