mirror of
https://github.com/luxfi/explore.git
synced 2026-10-30 14:46:12 +00:00
25 lines
693 B
TypeScript
25 lines
693 B
TypeScript
import React from 'react';
|
|
|
|
import useGradualIncrement from 'lib/hooks/useGradualIncrement';
|
|
import SocketNewItemsNotice from 'ui/shared/SocketNewItemsNotice';
|
|
|
|
interface Props {
|
|
overflow: number;
|
|
url: string;
|
|
isLoading: boolean;
|
|
}
|
|
|
|
const LatestTxsDegradedNewItems = ({ overflow, url, isLoading }: Props) => {
|
|
const [ num, setNum ] = useGradualIncrement(0);
|
|
|
|
React.useEffect(() => {
|
|
if (!isLoading && overflow > 0) {
|
|
setNum(overflow);
|
|
}
|
|
}, [ isLoading, overflow, setNum ]);
|
|
|
|
return <SocketNewItemsNotice className="rounded-b-none" num={ num } url={ url } showErrorAlert={ false } isLoading={ isLoading }/>;
|
|
};
|
|
|
|
export default React.memo(LatestTxsDegradedNewItems);
|