import {type StyleProp, type ViewStyle} from 'react-native' import {atoms as a} from '#/alf' import {Button, ButtonIcon, ButtonText} from '#/components/Button' import {useChatInvite} from './Context' /** * The join/open action button for a chat invite. Reads the derived action from * `ChatInvite.Root` context. Pass `onPress` to intercept (e.g. to close a * surface before navigating); it runs before the default action. Renders * nothing while loading or when there's no preview to act on. */ export function JoinButton({ onPress, style, }: { onPress?: () => void style?: StyleProp }) { const {action, hasFixedHeight} = useChatInvite() if (!action) return null return ( ) }