Animate call link join requests

This commit is contained in:
ayumi-signal 2024-09-24 11:33:58 -07:00 committed by GitHub
parent 7e9773a144
commit e51cde1770
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 117 additions and 15 deletions

View file

@ -60,6 +60,26 @@ export function Many(): JSX.Element {
);
}
export function Changing(): JSX.Element {
const counts = [0, 1, 2, 3, 2, 1];
const [countIndex, setCountIndex] = React.useState<number>(0);
React.useEffect(() => {
const interval = setInterval(() => {
setCountIndex((countIndex + 1) % counts.length);
}, 1000);
return () => clearInterval(interval);
}, [countIndex, counts.length]);
return (
<CallingPendingParticipants
{...createProps({
participants: allRemoteParticipants.slice(0, counts[countIndex]),
})}
/>
);
}
export function ExpandedOne(): JSX.Element {
return (
<CallingPendingParticipants