> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-docs-audit-content-webhooks.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Call Log History

> Call Log History — CometChat documentation.

## Overview

`CometChatCallLogHistory` is a [Component](/ui-kit/react-native/v4/components-overview#components) that shows a paginated list of all the calls between the logged-in user & another user or group. This allows the user to see all the calls with a specific user/group they have initiated/received/missed.

<Tabs>
  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/S4pTPhXdmnpWJLIt/images/2d9970cb-call_history_overview_cometchat_screens-bcf3b103142838d3fd9b984763145459.png?fit=max&auto=format&n=S4pTPhXdmnpWJLIt&q=85&s=b209da510bed2fc9d4b82a0da4770153" alt="Image" width="4498" height="3120" data-path="images/2d9970cb-call_history_overview_cometchat_screens-bcf3b103142838d3fd9b984763145459.png" />
  </Tab>

  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/SIU3NLl8GrgWvCMj/images/47a6f194-call_history_overview_cometchat_screens-8776e58d939aa168de3e60ef919a9bbf.png?fit=max&auto=format&n=SIU3NLl8GrgWvCMj&q=85&s=e97c1b9d19398afeca0b1c057914b12e" alt="Image" width="4498" height="3120" data-path="images/47a6f194-call_history_overview_cometchat_screens-8776e58d939aa168de3e60ef919a9bbf.png" />
  </Tab>
</Tabs>

## Usage

### Integration

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat } from "@cometchat/chat-sdk-react-native";
    import { CometChatCallLogHistory } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [loggedInUser, setLoggedInUser] = useState<CometChat.User>();
      useEffect(() => {
        //code
        CometChatUIKit.login({ uid: "uid" })
          .then(async (user: CometChat.User) => {
            setLoggedInUser(user);
          })
          .catch((error: any) => {
            //handle error
          });
      }, []);

      return <>{loggedInUser && <CometChatCallLogHistory />}</>;
    }
    ```
  </Tab>
</Tabs>

### Actions

[Actions](/ui-kit/react-native/v4/components-overview#actions) dictate how a component functions. They are divided into two types: Predefined and User-defined. You can override either type, allowing you to tailor the behavior of the component to fit your specific needs.

##### 1. onItemPress

`onItemPress` is triggered when you click on a ListItem of the of the `Call Log History` component. It does not have a default behavior. However, you can override its behavior using the following code snippet.

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat } from "@cometchat/chat-sdk-react-native";
    import { CometChatCallLogHistory } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [loggedInUser, setLoggedInUser] = useState<CometChat.User>();
      useEffect(() => {
        //code
        CometChatUIKit.login({ uid: "uid" })
          .then(async (user: CometChat.User) => {
            setLoggedInUser(user);
          })
          .catch((error: any) => {
            //handle error
          });
      }, []);

      const onItemPressHandler = (item: CometChat.BaseMessage) => {
        //code
      };

      return (
        <>
          {loggedInUser && (
            <CometChatCallLogHistory onItemPress={onItemPressHandler} />
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

##### 2. onBack

The `onBack` function is built to respond when you press the back button in the AppBar. The back button is only displayed when the prop `showBackButton` is set to true.

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat } from "@cometchat/chat-sdk-react-native";
    import { CometChatCallLogHistory } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [loggedInUser, setLoggedInUser] = useState<CometChat.User>();
      useEffect(() => {
        //code
        CometChatUIKit.login({ uid: "uid" })
          .then(async (user: CometChat.User) => {
            setLoggedInUser(user);
          })
          .catch((error: any) => {
            //handle error
          });
      }, []);

      const onBackHandler = () => {
        //code
      };

      return (
        <>
          {loggedInUser && (
            <CometChatCallLogHistory onBack={onBackHandler} showBackButton={true} />
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

##### 3. onError

This action doesn't change the behavior of the component but rather listens for any errors that occur in the `Call Log History` component.

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat } from "@cometchat/chat-sdk-react-native";
    import { CometChatCallLogHistory } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [loggedInUser, setLoggedInUser] = useState<CometChat.User>();
      useEffect(() => {
        //code
        CometChatUIKit.login({ uid: "uid" })
          .then(async (user: CometChat.User) => {
            setLoggedInUser(user);
          })
          .catch((error: any) => {
            //handle error
          });
      }, []);

      const onErrorHandler = (error: CometChat.CometChatException) => {
        //code
      };

      return (
        <>{loggedInUser && <CometChatCallLogHistory onError={onErrorHandler} />}</>
      );
    }
    ```
  </Tab>
</Tabs>

***

### Filters

**Filters** allow you to customize the data displayed in a list within a `Component`. You can filter the list based on your specific criteria, allowing for a more customized. Filters can be applied using `RequestBuilders` of Chat SDK.

##### 1. CallLogRequestBuilder

The [CallLogRequestBuilder](/sdk/javascript/call-logs) enables you to filter and customize the Call Log History based on available parameters in [CallLogRequestBuilder](/sdk/javascript/call-logs). This feature allows you to create more specific and targeted queries when fetching the call logs. The following are the parameters available in [CallLogRequestBuilder](/sdk/javascript/call-logs)

| Methods              | Type       | Description                                                  |
| -------------------- | ---------- | ------------------------------------------------------------ |
| **setLimit**         | number     | Specifies the number of call logs to fetch.                  |
| **setCallType**      | String     | Sets the type of calls to fetch (call or meet).              |
| **setCallStatus**    | callStatus | Sets the status of calls to fetch (initiated, ongoing, etc.) |
| **setHasRecording**  | boolean    | Sets whether to fetch calls that have recordings.            |
| **setCallCategory**  | string     | Sets the category of calls to fetch (call or meet).          |
| **setCallDirection** | string     | Sets the direction of calls to fetch (incoming or outgoing)  |
| **setUid**           | string     | Sets the UID of the user whose call logs to fetch.           |
| **setGuid**          | string     | Sets the GUID of the user whose call logs to fetch.          |
| **setAuthToken**     | string     | Sets the Auth token of the logged-in user.                   |

**Example**

In the example below, we're filtering Call Log History to show only canceled calls and setting the limit to five.

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat } from "@cometchat/chat-sdk-react-native";
    import { CometChatCallLogHistory } from "@cometchat/chat-uikit-react-native";
    import { CallLogRequestBuilder } from "@cometchat/calls-sdk-react-native";

    function App(): React.JSX.Element {
      const [loggedInUser, setLoggedInUser] = useState<CometChat.User>();
      useEffect(() => {
        //code
        CometChatUIKit.login({ uid: "uid" })
          .then(async (user: CometChat.User) => {
            setLoggedInUser(user);
          })
          .catch((error: any) => {
            //handle error
          });
      }, []);

      return (
        <>
          {loggedInUser && (
            <CometChatCallLogHistory
              callLogHistoryRequestBuilder={new CallLogRequestBuilder()
                .setLimit(5)
                .setAuthToken("auth-token")
                .setCallStatus("cancelled")
                .build()}
            />
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

***

### Events

[Events](/ui-kit/react-native/v4/components-overview#events) are emitted by a `Component`. By using event you can extend existing functionality. Being global events, they can be applied in Multiple Locations and are capable of being Added or Removed.

The `CallLogHistory` does not produce any events.

***

## Customization

To fit your app's design requirements, you have the ability to customize the appearance of the `CallLogHistory` component. We provide exposed methods that allow you to modify the experience and behavior according to your specific needs.

### Style

Using **Style** you can **customize** the look and feel of the component in your app, These parameters typically control elements such as the **color**, **size**, **shape**, and **fonts** used within the component.

##### 1. CallLogHistory Style

To customize the appearance, you can assign a `CallLogHistoryStyle` object to the `Call Log History` component.

<Tabs>
  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/9fXSeDIZdfRZBzT6/images/1c6ef7e7-call_history_style_cometchat_screens-906d1dd1e7687f83cccfc08083c626a1.png?fit=max&auto=format&n=9fXSeDIZdfRZBzT6&q=85&s=c83c0684d1ef4d546715cee8f6b784bf" alt="Image" width="4498" height="3120" data-path="images/1c6ef7e7-call_history_style_cometchat_screens-906d1dd1e7687f83cccfc08083c626a1.png" />
  </Tab>

  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/CPpOwQ6tJe7YNAEX/images/e511761b-call_history_style_cometchat_screens-1ad4b2b577647080d4db2d2c6c551cf4.png?fit=max&auto=format&n=CPpOwQ6tJe7YNAEX&q=85&s=e2ee79490d4fc5b3b10ee4a5b15a2ac6" alt="Image" width="4498" height="3120" data-path="images/e511761b-call_history_style_cometchat_screens-1ad4b2b577647080d4db2d2c6c551cf4.png" />
  </Tab>
</Tabs>

In this example, we are employing the `callLogHistoryStyle`.

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat } from "@cometchat/chat-sdk-react-native";
    import {
      CometChatCallLogHistory,
      CallLogHistoryStyleInterface,
    } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [loggedInUser, setLoggedInUser] = useState<CometChat.User>();
      useEffect(() => {
        //code
        CometChatUIKit.login({ uid: "uid" })
          .then(async (user: CometChat.User) => {
            setLoggedInUser(user);
          })
          .catch((error: any) => {
            //handle error
          });
      }, []);

      const callLogHistoryStyle: CallLogHistoryStyleInterface = {
        titleColor: "#3c2999",
        backgroundColor: "#d2cafa",
      };

      return (
        <>
          {loggedInUser && (
            <CometChatCallLogHistory
              callLogHistoryStyle={callLogHistoryStyle}
              listItemStyle={{ backgroundColor: "#d2cafa" }}
            />
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

***

The following properties are exposed by `CallLogHistoryStyle`:

| Property                   | Description                           | Code                                          |
| -------------------------- | ------------------------------------- | --------------------------------------------- |
| **border**                 | Used to set border                    | `border?: BorderStyleInterface,`              |
| **borderRadius**           | Used to set border radius             | `borderRadius?: number;`                      |
| **backgroundColor**        | Used to set background colour         | `background?: string;`                        |
| **height**                 | Used to set height                    | `height?: number` \| `string;`                |
| **width**                  | Used to set width                     | `width?: number` \| `string;`                 |
| **titleFont**              | Used to set title font                | `titleFont?: FontStyleInterface,`             |
| **titleColor**             | Used to set title color               | `titleColor?: string;`                        |
| **loadingTint**            | Used to set loading icon font         | `loadingTint?: FontStyleInterface,`           |
| **emptyTextColor**         | Used to set empty state text color    | `emptyTextColor?: string;`                    |
| **emptyTextFont**          | Used to set empty state text font     | `emptyTextFont?: FontStyleInterface;`         |
| **errorTextColor**         | Used to set error state text color    | `errorTextColor?: string;`                    |
| **errorTextFont**          | Used to set error state text font     | `errorTextFont?: FontStyleInterface;`         |
| **backIconTint**           | Used to set back icon tint            | `backIconTint?: string;`                      |
| **dateTextFont**           | Used to set date text font            | `dateTextFont?: FontStyleInterface;`          |
| **dateTextColor**          | Used to set date text color           | `dateTextColor?: string;`                     |
| **dateSeparatorTextFont**  | Used to set date separator text font  | `dateSeparatorTextFont?: FontStyleInterface;` |
| **dateSeparatorTextColor** | Used to set date separator text color | `dateSeparatorTextColor?: string;`            |
| **callDurationTextFont**   | Used to set call duration text font   | `callDurationTextFont?: FontStyleInterface;`  |
| **callDurationTextColor**  | Used to set call duration text color  | `callDurationTextColor?: string;`             |
| **callStatusTextFont**     | Used to set call status text font     | `callStatusTextFont?: FontStyleInterface;`    |
| **callStatusTextColor**    | Used to set call status text color    | `callStatusTextColor?: string;`               |
| **separatorColor**         | Used to set separator color           | `separatorColor?: string;`                    |

##### 2. ListItem Style

If you want to apply customized styles to the `ListItemStyle` component within the `Call Log History` Component, you can use the following code snippet. For more information, you can refer [ListItem Styles](/ui-kit/react-native/v4/list-item#listitemstyle).

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat } from "@cometchat/chat-sdk-react-native";
    import {
      CometChatCallLogHistory,
      CallLogHistoryStyleInterface,
    } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [loggedInUser, setLoggedInUser] = useState<CometChat.User>();
      useEffect(() => {
        //code
        CometChatUIKit.login({ uid: "uid" })
          .then(async (user: CometChat.User) => {
            setLoggedInUser(user);
          })
          .catch((error: any) => {
            //handle error
          });
      }, []);

      const callLogHistoryStyle: CallLogHistoryStyleInterface = {
        titleColor: "#3c2999",
        backgroundColor: "#d2cafa",
      };

      return (
        <>
          {loggedInUser && (
            <CometChatCallLogHistory
              callLogHistoryStyle={callLogHistoryStyle}
              listItemStyle={{ backgroundColor: "#d2cafa" }}
            />
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

***

### Functionality

These are a set of small functional customizations that allow you to fine-tune the overall experience of the component. With these, you can change text, set custom icons, and toggle the visibility of UI elements.

Here is a code snippet demonstrating how you can customize the functionality of the `Call Log History` component.

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat } from "@cometchat/chat-sdk-react-native";
    import { CometChatCallLogHistory } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [loggedInUser, setLoggedInUser] = useState<CometChat.User>();
      useEffect(() => {
        //code
        CometChatUIKit.login({ uid: "uid" })
          .then(async (user: CometChat.User) => {
            setLoggedInUser(user);
          })
          .catch((error: any) => {
            //handle error
          });
      }, []);

      return (
        <>
          {loggedInUser && (
            <CometChatCallLogHistory title=" **  Custom Title  **" />
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

<Tabs>
  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/W0TFCZ2NyXOY9_IP/images/a2c3146a-call_history_func_cometchat_screens-d9724c1a59db1016f4120435d97d8599.png?fit=max&auto=format&n=W0TFCZ2NyXOY9_IP&q=85&s=47c9c456e5c11a6ad19030a3231ad1b2" alt="Image" width="4498" height="3120" data-path="images/a2c3146a-call_history_func_cometchat_screens-d9724c1a59db1016f4120435d97d8599.png" />
  </Tab>

  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/B3XaZtq031kOZfI6/images/d5089e63-call_history_func_cometchat_screens-311f175c8ecf6d39040c7539df543465.png?fit=max&auto=format&n=B3XaZtq031kOZfI6&q=85&s=21bd01f059dc7f3779ab22ed89b91897" alt="Image" width="4498" height="3120" data-path="images/d5089e63-call_history_func_cometchat_screens-311f175c8ecf6d39040c7539df543465.png" />
  </Tab>
</Tabs>

Below is a list of customizations along with corresponding code snippets

| Property                                                     | Description                                       | Code                                            |
| ------------------------------------------------------------ | ------------------------------------------------- | ----------------------------------------------- |
| **title** <Tooltip tip="Not available">🛑</Tooltip>          | Used to set custom title                          | `title='Your Custom Title'`                     |
| **emptyStateText** <Tooltip tip="Not available">🛑</Tooltip> | Used to set custom empty state text               | `emptyStateText='Your Custom Empty State Text'` |
| **errorStateText** <Tooltip tip="Not available">🛑</Tooltip> | Used to set custom error state text               | `errorStateText='Your Custom Error State Text'` |
| **datePattern**                                              | Used to set custom date pattern                   | `datePattern?: DatePattern`                     |
| **dateSeparatorPattern**                                     | Used to set custom date separator pattern         | `dateSeparatorPattern?: DatePattern`            |
| **showBackButton**                                           | Used to control the visibility of the back button | `showBackButton?: boolean`                      |
| **BackButton**                                               | Used to set custom back icon                      | `BackButton?: JSX.Element;`                     |
| **hideError**                                                | Used to hide errors                               | `hideError?: boolean`                           |
| **loadingIcon**                                              | Used to set custom loading icon                   | `loadingIcon?: ImageType;`                      |
| **user**                                                     | Used to set group object                          | `user?: CometChat.User`                         |
| **group**                                                    | Used to set group object                          | `group?: CometChat.Group`                       |

***

### Advanced

For advanced-level customization, you can set custom views to the component. This lets you tailor each aspect of the component to fit your exact needs and application aesthetics. You can create and define your views, layouts, and UI elements and then incorporate those into the component.

***

#### TailView

You can customize the tail view for each call log history item to meet your requirements

<Tabs>
  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/SIU3NLl8GrgWvCMj/images/467423f9-call_history_tail_cometchat_screens-70d07ac1bce78bf719fb2725c64f51d4.png?fit=max&auto=format&n=SIU3NLl8GrgWvCMj&q=85&s=053c015b53dcceb28bbe442a07120d0b" alt="Image" width="4498" height="3120" data-path="images/467423f9-call_history_tail_cometchat_screens-70d07ac1bce78bf719fb2725c64f51d4.png" />
  </Tab>

  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/uaZLJNiJIbmCM9p_/images/60735e04-call_history_tail_cometchat_screens-a582703a457e3aa304b38f4ec67cfb71.png?fit=max&auto=format&n=uaZLJNiJIbmCM9p_&q=85&s=b1b07ec905520aaf4afe126bee18f28f" alt="Image" width="4498" height="3120" data-path="images/60735e04-call_history_tail_cometchat_screens-a582703a457e3aa304b38f4ec67cfb71.png" />
  </Tab>
</Tabs>

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat } from "@cometchat/chat-sdk-react-native";
    import { CometChatCallLogHistory } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [loggedInUser, setLoggedInUser] = useState<CometChat.User>();
      useEffect(() => {
        //code
        CometChatUIKit.login({ uid: "uid" })
          .then(async (user: CometChat.User) => {
            setLoggedInUser(user);
          })
          .catch((error: any) => {
            //handle error
          });
      }, []);

      const getCustomTailView = (param: any) => {
        return <Image style={{ tintColor: "#6851D6" }} source={Call}></Image>;
      };

      return (
        <>
          {loggedInUser && <CometChatCallLogHistory TailView={getCustomTailView} />}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

***

#### LoadingStateView

You can set a custom loader view using `loadingStateView` to match the loading view of your app.

<Tabs>
  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/B3XaZtq031kOZfI6/images/d32e5697-call_history_loading_cometchat_screens-054d163f067925a91f558cbe86b28af7.png?fit=max&auto=format&n=B3XaZtq031kOZfI6&q=85&s=459f6a5ec357e8ed3a139233d813a635" alt="Image" width="4498" height="3120" data-path="images/d32e5697-call_history_loading_cometchat_screens-054d163f067925a91f558cbe86b28af7.png" />
  </Tab>

  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/0zf0AzyXRy6UbTAi/images/f1c39774-call_history_loading_cometchat_screens-bcd6c90ed2a73814c682bbd772af9928.png?fit=max&auto=format&n=0zf0AzyXRy6UbTAi&q=85&s=cafbe898b0852dea2b3353f981bbf192" alt="Image" width="4498" height="3120" data-path="images/f1c39774-call_history_loading_cometchat_screens-bcd6c90ed2a73814c682bbd772af9928.png" />
  </Tab>
</Tabs>

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat } from "@cometchat/chat-sdk-react-native";
    import { CometChatCallLogHistory } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [loggedInUser, setLoggedInUser] = useState<CometChat.User>();
      useEffect(() => {
        //code
        CometChatUIKit.login({ uid: "uid" })
          .then(async (user: CometChat.User) => {
            setLoggedInUser(user);
          })
          .catch((error: any) => {
            //handle error
          });
      }, []);

      const loadingViewStyle: StyleProp<ViewStyle> = {
        flex: 1,
        alignItems: "center",
        justifyContent: "center",
        padding: 10,
        borderColor: "black",
        borderWidth: 1,
        backgroundColor: "#E8EAE9",
      };

      const getLoadingStateView = () => {
        return (
          <View style={loadingViewStyle}>
            <Text style={{ fontSize: 20, color: "black" }}>Loading...</Text>
          </View>
        );
      };

      return (
        <>
          {loggedInUser && (
            <CometChatCallLogHistory LoadingStateView={getLoadingStateView} />
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

***

#### EmptyStateView

You can set a custom `EmptyStateView` using `EmptyStateView` to match the empty view of your app.

<Tabs>
  <Tab title="iOS">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/tp6xSR_fOiM1f2LY/images/af84f536-call_history_empty_cometchat_screens-e990db1eb256a5e34dcf59e176ed601a.png?fit=max&auto=format&n=tp6xSR_fOiM1f2LY&q=85&s=979998da947e260b72a32288b2eb5376" alt="Image" width="4498" height="3120" data-path="images/af84f536-call_history_empty_cometchat_screens-e990db1eb256a5e34dcf59e176ed601a.png" />
  </Tab>

  <Tab title="Android">
    <img src="https://mintcdn.com/cometchat-22654f5b-docs-audit-content-webhooks/W0TFCZ2NyXOY9_IP/images/a8384b15-call_history_empty_cometchat_screens-645ce143573db2ac59958393cf764417.png?fit=max&auto=format&n=W0TFCZ2NyXOY9_IP&q=85&s=33a87e0af9eee7f184ac7a04fd58f3ae" alt="Image" width="4498" height="3120" data-path="images/a8384b15-call_history_empty_cometchat_screens-645ce143573db2ac59958393cf764417.png" />
  </Tab>
</Tabs>

<Tabs>
  <Tab title="App.tsx">
    ```tsx theme={null}
    import { CometChat } from "@cometchat/chat-sdk-react-native";
    import { CometChatCallLogHistory } from "@cometchat/chat-uikit-react-native";

    function App(): React.JSX.Element {
      const [loggedInUser, setLoggedInUser] = useState<CometChat.User>();
      useEffect(() => {
        //code
        CometChatUIKit.login({ uid: "uid" })
          .then(async (user: CometChat.User) => {
            setLoggedInUser(user);
          })
          .catch((error: any) => {
            //handle error
          });
      }, []);

      const emptyViewStyle: StyleProp<ViewStyle> = {
        flex: 1,
        alignItems: "center",
        justifyContent: "center",
        padding: 10,
        borderColor: "black",
        borderWidth: 1,
        backgroundColor: "#E8EAE9",
        marginLeft: 2,
        marginRight: 2,
        marginBottom: 30,
      };

      const getEmptyStateView = () => {
        //alice-uid
        return (
          <View style={emptyViewStyle}>
            <Text style={{ fontSize: 80, color: "black" }}>Empty</Text>
          </View>
        );
      };

      return (
        <>
          {loggedInUser && (
            <CometChatCallLogHistory EmptyStateView={getEmptyStateView} />
          )}
        </>
      );
    }
    ```
  </Tab>
</Tabs>

***
