feat: add ping animation in website realtime visitor

This commit is contained in:
moonrailgun 2024-10-04 21:22:36 +08:00
parent 9bc8c63fe2
commit 6da0e6f415

View File

@ -17,7 +17,10 @@ export const WebsiteOnlineCount: React.FC<{
if (typeof count === 'number' && count > 0) { if (typeof count === 'number' && count > 0) {
return ( return (
<div className="flex items-center space-x-2"> <div className="flex items-center space-x-2">
<div className="h-2.5 w-2.5 flex-shrink-0 rounded-full bg-green-500" /> <div className='w-2.5" relative flex h-2.5'>
<div className="absolute inline-flex h-full w-full animate-ping rounded-full bg-green-500 opacity-75" />
<div className="h-2.5 w-2.5 flex-shrink-0 rounded-full bg-green-500" />
</div>
<span> <span>
{count} {t('current visitor')} {count} {t('current visitor')}
</span> </span>