The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/apps/meteor/client/views/room/Header/HeaderIconWithRoom.tsx

22 lines
743 B

import type { IRoom } from '@rocket.chat/core-typings';
import { isOmnichannelRoom } from '@rocket.chat/core-typings';
import { HeaderIcon } from '@rocket.chat/ui-client';
import type { ReactElement } from 'react';
import React from 'react';
import { OmnichannelRoomIcon } from '../../../components/RoomIcon/OmnichannelRoomIcon';
import { useRoomIcon } from '../../../hooks/useRoomIcon';
type HeaderIconWithRoomProps = {
room: IRoom;
};
const HeaderIconWithRoom = ({ room }: HeaderIconWithRoomProps): ReactElement => {
const icon = useRoomIcon(room);
if (isOmnichannelRoom(room)) {
return <OmnichannelRoomIcon room={room} size='x20' placement='default' />;
}
return <HeaderIcon icon={icon} />;
};
export default HeaderIconWithRoom;