import { IImageButtonStyleProps, IStyledProps } from '../../../../common/types'; import React, { FunctionComponent } from 'react'; import { ImageSourcePropType } from 'react-native'; import { hideActiveCurrentConference } from '../../../../../store/conference/conferenceSlice'; import { IConference } from '../../../../../store/conference/types'; import { GoToChatButtonView } from './GoToChatButtonView'; import { ImageButton } from '../../../../common/ImageButton'; import { useAppDispatch } from '../../../../../store/hooks'; interface IProps extends IStyledProps { call: IConference imageSource?: ImageSourcePropType; renderOnPress?: (call: IConference) => void; } export const GoToChatButton: FunctionComponent = ({ imageSource, renderOnPress, call, style }) => { const dispatch = useAppDispatch() const goBackToBubbleChat = () => { if (renderOnPress) { renderOnPress(call); dispatch(hideActiveCurrentConference()); } } if (imageSource) { return } else { return ; } };