UNPKG

react-native-chating-ui-kit

Version:

CometChat React Native UI Kit is a collection of custom UI Components designed to build text , chat and calling features in your application. The UI Kit is developed to keep developers in mind and aims to reduce development efforts significantly

30 lines 1.29 kB
import React, { useState, useRef, useContext } from 'react'; import { View } from 'react-native'; import { Style } from './style'; import { CometChatContext } from '../../shared'; const CometChatCallHistoryWithDetails = (props) => { const { call, callDetailsConfiguration, callHistoryConfiguration, onError } = props; const [showDetails, setShowDetails] = useState(call ? true : false); const selectedCall = useRef(call); const { theme } = useContext(CometChatContext); return (<View> {/* <CometChatCallHistory onInfoIconPress={({ call }) => { selectedCall.current = call as CometChat.Call; setShowDetails(true) }} onError={onError} {...callHistoryConfiguration} /> */} {showDetails && <View style={[Style.stackScreen, { backgroundColor: theme.palette.getBackgroundColor() }]}> {/* <CometChatCallDetails onError={onError} call={selectedCall.current} onBack={() => setShowDetails(false)} {...callDetailsConfiguration} /> */} </View>} </View>); }; //# sourceMappingURL=CometChatCallHistoryWithDetails.js.map