Files
meet/src/frontend/src/features/rooms/api/lowerHandParticipants.ts
T
lebaudantoine 6ccc9ef0bf ⬆️(frontend) upgrade frontend to ESLint 9
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.
2026-06-03 18:45:48 +02:00

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 }
}