diff --git a/src/frontend/src/features/participants/components/LowerAllHandsButton.tsx b/src/frontend/src/features/participants/components/LowerAllHandsButton.tsx index af9da045..434ecd1e 100644 --- a/src/frontend/src/features/participants/components/LowerAllHandsButton.tsx +++ b/src/frontend/src/features/participants/components/LowerAllHandsButton.tsx @@ -2,22 +2,21 @@ import { Button } from '@/primitives' import { useTranslation } from 'react-i18next' import type { Participant } from 'livekit-client' import { useLowerHandParticipants } from '../api/lowerHandParticipants' -import { useIsAdminOrOwner } from '@/features/rooms/livekit/hooks/useIsAdminOrOwner' import { css } from '@/styled-system/css' import { RiHand } from '@remixicon/react' +import { AdminOrOwnerOnly } from '@/features/rooms/components/AdminOrOwnerOnly' type LowerAllHandsButtonProps = { participants: Array } -export const LowerAllHandsButton = ({ +const LowerAllHandsButtonInner = ({ participants, }: LowerAllHandsButtonProps) => { const { lowerHandParticipants } = useLowerHandParticipants() const { t } = useTranslation('rooms') - const isAdminOrOwner = useIsAdminOrOwner() - if (!isAdminOrOwner) return null + if (!participants.length) return null return (