diff --git a/apps/meteor/client/components/avatar/BaseAvatar.tsx b/apps/meteor/client/components/avatar/BaseAvatar.tsx index d32f96f57881..043f872c2336 100644 --- a/apps/meteor/client/components/avatar/BaseAvatar.tsx +++ b/apps/meteor/client/components/avatar/BaseAvatar.tsx @@ -2,19 +2,29 @@ import type { AvatarProps } from '@rocket.chat/fuselage'; import { Avatar, Skeleton } from '@rocket.chat/fuselage'; import type { FC } from 'react'; import React, { useState } from 'react'; +import { useRoomToolbox } from '../../views/room/contexts/RoomToolboxContext'; +import { useTranslation } from '@rocket.chat/ui-contexts'; export type BaseAvatarProps = Omit; const BaseAvatar: FC = ({ onError, ...props }) => { const [isLoading, setIsLoading] = useState(false); - + const t = useTranslation(); if (isLoading) { return ; } - + const toolbox = useRoomToolbox(); + const { actions, openTab } = toolbox; + console.log(actions); + console.log(props); + const handleClick = () => { + openTab(actions[0]?.id); + } return ( { setIsLoading(true); onError?.(event);