mirror of
https://github.com/suitenumerique/meet.git
synced 2026-08-27 18:56:58 +00:00
🚚(frontend) move participant list code into a feature folder
Reorganize all participant list related code elements into a dedicated feature folder, so related components, hooks and helpers are grouped together and easier to locate.
This commit is contained in:
committed by
aleb_the_flash
parent
64b4200fc3
commit
d1dde71bea
@@ -0,0 +1,21 @@
|
||||
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 }
|
||||
}
|
||||
Reference in New Issue
Block a user