mirror of
https://github.com/suitenumerique/meet.git
synced 2026-07-26 11:58:53 +00:00
bf6f7430e7
Mark JS imports as type-only when applicable so they are stripped at build time and ignored during chunk splitting, ensuring we take full advantage of Rollup's code-splitting optimizations.
30 lines
832 B
TypeScript
30 lines
832 B
TypeScript
import { useToast } from '@react-aria/toast'
|
|
import { useRef } from 'react'
|
|
|
|
import { StyledToastContainer, type ToastProps } from './Toast'
|
|
import { HStack } from '@/styled-system/jsx'
|
|
import { useTranslation } from 'react-i18next'
|
|
|
|
export function ToastMuted({ state, ...props }: Readonly<ToastProps>) {
|
|
const { t } = useTranslation('notifications')
|
|
const ref = useRef(null)
|
|
const { toastProps, contentProps } = useToast(props, state, ref)
|
|
const participant = props.toast.content.participant
|
|
|
|
if (!participant) return
|
|
|
|
return (
|
|
<StyledToastContainer {...toastProps} ref={ref}>
|
|
<HStack
|
|
justify="center"
|
|
alignItems="center"
|
|
{...contentProps}
|
|
padding={14}
|
|
gap={0}
|
|
>
|
|
{t('muted', { name: participant.name })}
|
|
</HStack>
|
|
</StyledToastContainer>
|
|
)
|
|
}
|