RocketChat/Rocket.Chat

View on GitHub
apps/meteor/client/hooks/roomActions/useContactChatHistoryRoomAction.ts

Summary

Maintainability
A
1 hr
Test Coverage
import { lazy, useMemo } from 'react';

import type { RoomToolboxActionConfig } from '../../views/room/contexts/RoomToolboxContext';

const ContactHistory = lazy(() => import('../../views/omnichannel/contactHistory/ContactHistory'));

export const useContactChatHistoryRoomAction = () => {
    return useMemo(
        (): RoomToolboxActionConfig => ({
            id: 'contact-chat-history',
            groups: ['live'],
            title: 'Contact_Chat_History',
            icon: 'clock',
            tabComponent: ContactHistory,
            order: 11,
        }),
        [],
    );
};