mirror of
https://github.com/suitenumerique/meet.git
synced 2026-08-11 03:07:43 +00:00
6ccc9ef0bf
Manually upgrade the frontend codebase to ESLint 9. Update the linting configuration and related code where required to maintain compatibility with the new major version.
22 lines
688 B
TypeScript
22 lines
688 B
TypeScript
import type { Participant } from 'livekit-client'
|
|
import { useLowerHandParticipant } from './lowerHandParticipant'
|
|
|
|
export const useLowerHandParticipants = () => {
|
|
const { lowerHandParticipant } = useLowerHandParticipant()
|
|
|
|
const lowerHandParticipants = (participants: Array<Participant>) => {
|
|
try {
|
|
const promises = participants.map((participant) =>
|
|
lowerHandParticipant(participant)
|
|
)
|
|
return Promise.all(promises)
|
|
} catch (error) {
|
|
console.error('An error occurred while lowering hands :', error)
|
|
throw new Error('An error occurred while lowering hands.', {
|
|
cause: error,
|
|
})
|
|
}
|
|
}
|
|
return { lowerHandParticipants }
|
|
}
|