diff --git a/client/hooks/useRoomIcon.tsx b/client/hooks/useRoomIcon.tsx index bb39e6e157268..a86b10a599252 100644 --- a/client/hooks/useRoomIcon.tsx +++ b/client/hooks/useRoomIcon.tsx @@ -10,10 +10,7 @@ export const colors = { offline: 'neutral-600', }; -export const useRoomIcon = ( - room: IRoom, - small = true, -): JSX.Element | { name: string; color?: string } | null => { +export const useRoomIcon = (room: IRoom): JSX.Element | { name: string; color?: string } | null => { if (room.prid) { return { name: 'baloons' }; } @@ -38,7 +35,6 @@ export const useRoomIcon = ( return ( uid !== room.u._id)[0] || room.u._id, } as any)} /> diff --git a/client/sidebar/RoomList/SidebarIcon.js b/client/sidebar/RoomList/SidebarIcon.js index 1a2658aa1b64e..8eedb10f05416 100644 --- a/client/sidebar/RoomList/SidebarIcon.js +++ b/client/sidebar/RoomList/SidebarIcon.js @@ -3,8 +3,8 @@ import React from 'react'; import { useRoomIcon } from '../../hooks/useRoomIcon'; -const SidebarIcon = ({ room, small }) => { - const icon = useRoomIcon(room, small); +const SidebarIcon = ({ room }) => { + const icon = useRoomIcon(room); return {!icon.name && icon}; }; diff --git a/client/sidebar/search/UserItem.js b/client/sidebar/search/UserItem.js index 593be64893231..3223f59dee72f 100644 --- a/client/sidebar/search/UserItem.js +++ b/client/sidebar/search/UserItem.js @@ -4,21 +4,11 @@ import React, { memo } from 'react'; import { roomTypes } from '../../../app/utils/client'; import { ReactiveUserStatus } from '../../components/UserStatus'; -const UserItem = ({ - item, - id, - style, - t, - SideBarItemTemplate, - AvatarTemplate, - useRealName, - sidebarViewMode, -}) => { +const UserItem = ({ item, id, style, t, SideBarItemTemplate, AvatarTemplate, useRealName }) => { const title = useRealName ? item.fname || item.name : item.name || item.fname; - const small = sidebarViewMode !== 'medium'; const icon = ( - + ); const href = roomTypes.getRouteLink(item.t, item);