RocketChat/Rocket.Chat

View on GitHub
apps/meteor/client/sidebarv2/footer/SidebarFooter.tsx

Summary

Maintainability
A
1 hr
Test Coverage
import type { ReactElement } from 'react';
import React from 'react';

import { useIsCallEnabled, useIsCallReady } from '../../contexts/CallContext';
import SidebarFooterDefault from './SidebarFooterDefault';
import { VoipFooter } from './voip';

const SidebarFooter = (): ReactElement => {
    const isCallEnabled = useIsCallEnabled();
    const ready = useIsCallReady();

    if (isCallEnabled && ready) {
        return <VoipFooter />;
    }

    return <SidebarFooterDefault />;
};

export default SidebarFooter;