const [visible, setVisible] = useState<boolean>(false);
return (
<>
<Button title="Return to Inbox" onPress={() => setVisible(!visible)} />
{visible && (
<IterableInbox
returnToInboxTrigger={visible}
customizations={{
navTitle: 'My Inbox',
unreadIndicator: {
backgroundColor: 'red',
height: 10,
}
}}
showNavTitle={true}
tabBarHeight={80}
/>
)}
</>
)
The
IterableInbox
component is responsible for displaying an inbox of messages. It handles fetching messages, displaying them in a list, and showing individual message details. It also manages the state of the inbox, including loading state, selected message, and visible message impressions.