Skip to content

Commit

Permalink
feat: add ping animation in website realtime visitor
Browse files Browse the repository at this point in the history
  • Loading branch information
moonrailgun committed Oct 4, 2024
1 parent 9bc8c63 commit 6da0e6f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/client/components/website/WebsiteOnlineCount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ export const WebsiteOnlineCount: React.FC<{
if (typeof count === 'number' && count > 0) {
return (
<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>
{count} {t('current visitor')}
</span>
Expand Down

0 comments on commit 6da0e6f

Please sign in to comment.