import React, { useMemo } from 'react'; import { useParticipants } from '@dailyjs/shared/contexts/ParticipantsProvider'; import { useUIState } from '@dailyjs/shared/contexts/UIStateProvider'; export const Header = () => { const { participantCount } = useParticipants(); const { customCapsule } = useUIState(); return useMemo( () => (
Daily
Basic call demo
{`${participantCount} ${ participantCount === 1 ? 'participant' : 'participants' }`}
{customCapsule && (
{customCapsule.variant === 'recording' && } {customCapsule.label}
)}
), [participantCount, customCapsule] ); }; export default Header;