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/client/components/UserStatus.js

56 lines
1.9 KiB

[IMPROVE] New sidebar layout (#19089) * wip * wip * more work in progress * lint * Fix IE11 support livechat widget * More wip * lint * Add correct buttons and fix some errors * fix import * Fix error with empty department agents * fix title and tags * more fixes * fix agents save * Fix agentlist not saving * First Review * update fuselage * Sidebar variations * Fix Stories * Sidebar Header * Initial data * Fix paddings * sidebar search * Wip Chats * Added more logic * Fix Memo * Virtual List * switch to VariableSizeList * Fix Size * Te acalma Gabriel * Badges * Menu actions * Do not group by type option * Highligthed state * Fix menu * Item Skeletons * Search list * Omnichannel to virtualList * Sidebar header * SidebarHeader * Better Ominichannel Context usage * Revome livechat template * Remove discussion Room List * alert and open prop * Menu as renderprop * ReactiveUserPresence * Update components * Update cachedCollection * Fiz discussions * update cachedcolletion * Header color * Fix unread * Presence * Fix presence * Fix Admin * [wip] Search bar * get usernames in subscription * Local an spotlight search * Fix avatar id prop * Fix multi users on search * Livechat RoomMenu * Fix Header in anonymous sessions * Fix sidebar * update base old * Sidebar variations * Fix Stories * Sidebar Header * Initial data * Fix paddings * sidebar search * Wip Chats * Added more logic * Virtual List * Fix Memo * switch to VariableSizeList * Fix Size * Te acalma Gabriel * Badges * Menu actions * Do not group by type option * Highligthed state * Item Skeletons * Search list * Fix menu * Omnichannel to virtualList * Sidebar header * SidebarHeader * Better Ominichannel Context usage * Revome livechat template * Remove discussion Room List * alert and open prop * Menu as renderprop * ReactiveUserPresence * Update components * Update cachedCollection * Fiz discussions * update cachedcolletion * Header color * Fix unread * Presence * Fix presence * Fix Admin * [wip] Search bar * get usernames in subscription * Local an spotlight search * Fix avatar id prop * [FIX] Missing "Bio" in user's profile view (#19166) * [FIX] Omnichannel: triggers page not rendering (#19134) * [FIX] VisitorAutoComplete component (#19133) * [FIX] Admin Sidebar overflowing (#19101) * [FIX] Integrations history page not reacting to changes. (#19114) * [FIX] Selecting the same department for multiple units (#19168) * [FIX] Error when editing priority and required description (#19170) * [FIX] Thread view in a channel user haven't joined (#19172) * [FIX] Livechat Appearance label and reset button (#19171) * Refactor: Omnichannel departments (#18920) Co-authored-by: Guilherme Gazzo <guilherme@gazzo.xyz> Co-authored-by: Gabriel Henriques <gabriel.henriques@rocket.chat> Co-authored-by: Guilherme Gazzo <guilhermegazzo@gmail.com> * Fix multi users on search * Livechat RoomMenu * Fix Header in anonymous sessions * Fix sidebar * Fix admin user Info * update base old * fix sidebar size * Fix sidebar tests * Lint * Package-lock * package-lock * Fix callback * Removed useless files * Fix LGTM * Isolate userpresence to dont leak react and fuselage * Fix Alert * update fuselage * fix hide modal not closing * Sort by name and activity * Fix reset * Arrow controls (#19239) Co-authored-by: Guilherme Gazzo <guilherme@gazzo.xyz> * Fixes * ActionButton * ActionButton[2] * ActionButton [3] * Support anonymous * Open menu by keyboard * Login button for anonymous users * Login button for anonymous users * Update code * ShouldUpdate * Change login Icon, fix badge * Update fuselage * Fix storybook * Fix storybook * Use Style and renamed * wip stories sidebar * Types * wip * Testing IE11 * WIP * Fix Typo * Use Layout colors * Lint * Fix * Remove CallProvider * Remove CallContext Co-authored-by: Martin <martin.schoeler@rocket.chat> Co-authored-by: Gabriel Henriques <gabriel.henriques@rocket.chat> Co-authored-by: Douglas Fabris <deefabris@gmail.com> Co-authored-by: gabriellsh <40830821+gabriellsh@users.noreply.github.com> Co-authored-by: Renato Becker <renato.augusto.becker@gmail.com> Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat>
5 years ago
import React, { useEffect, useState } from 'react';
import { StatusBullet } from '@rocket.chat/fuselage';
import { useSafely } from '@rocket.chat/fuselage-hooks';
[NEW] User profile and User card (#18194) * Handle Avatar on Error * User Status Component * User Card Component * More variations * More Variations * Loading State * useTimezoneTime Hook * UTCClock Component * Fix BaseAvatar * getStatus Helper * Rewrite User info to reuse + Stories * Changes to open on Channels * ??? * Fix reactAdapters * Translation Provider * Fix lint * Improve loading state * WIP * UserCard and UserInfo Actions * Lint * Review * wip * Fix user info * Update fuselage * Update fuselage 0.13.0 * sad * sad[2] * fix camelCase paths * Fix Ghost menu * Fix some weird behaviors * Fix missing user ID on actions * Fix visual * Fix VerticalBar * Opss missing email field * Missing some fields * Update Fuselage * Update app/theme/client/imports/components/contextual-bar.css Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * Remove Old userInfo template * UserCard Api * Update client/admin/customEmoji/CustomEmojiRoute.js Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * Remove unused variables * Fix contextual-bar CSS selectors * Destructure additional props in UserInfoWithData * Remove obsolete props from VerticalBar * Remove commented code * Place useSetModal hook * Apply suggestions from code review Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * Fiz markdown * Update client/components/basic/UserCard.js Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * Update client/components/basic/avatar/UserAvatar.js Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * rename base avatar Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> Co-authored-by: Gabriel Henriques <gabriel.henriques@rocket.chat>
5 years ago
import { useTranslation } from '../contexts/TranslationContext';
import { Presence } from '../lib/presence';
[NEW] User profile and User card (#18194) * Handle Avatar on Error * User Status Component * User Card Component * More variations * More Variations * Loading State * useTimezoneTime Hook * UTCClock Component * Fix BaseAvatar * getStatus Helper * Rewrite User info to reuse + Stories * Changes to open on Channels * ??? * Fix reactAdapters * Translation Provider * Fix lint * Improve loading state * WIP * UserCard and UserInfo Actions * Lint * Review * wip * Fix user info * Update fuselage * Update fuselage 0.13.0 * sad * sad[2] * fix camelCase paths * Fix Ghost menu * Fix some weird behaviors * Fix missing user ID on actions * Fix visual * Fix VerticalBar * Opss missing email field * Missing some fields * Update Fuselage * Update app/theme/client/imports/components/contextual-bar.css Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * Remove Old userInfo template * UserCard Api * Update client/admin/customEmoji/CustomEmojiRoute.js Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * Remove unused variables * Fix contextual-bar CSS selectors * Destructure additional props in UserInfoWithData * Remove obsolete props from VerticalBar * Remove commented code * Place useSetModal hook * Apply suggestions from code review Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * Fiz markdown * Update client/components/basic/UserCard.js Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * Update client/components/basic/avatar/UserAvatar.js Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * rename base avatar Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> Co-authored-by: Gabriel Henriques <gabriel.henriques@rocket.chat>
5 years ago
export const UserStatus = React.memo(({ small, status, ...props }) => {
[IMPROVE] New sidebar layout (#19089) * wip * wip * more work in progress * lint * Fix IE11 support livechat widget * More wip * lint * Add correct buttons and fix some errors * fix import * Fix error with empty department agents * fix title and tags * more fixes * fix agents save * Fix agentlist not saving * First Review * update fuselage * Sidebar variations * Fix Stories * Sidebar Header * Initial data * Fix paddings * sidebar search * Wip Chats * Added more logic * Fix Memo * Virtual List * switch to VariableSizeList * Fix Size * Te acalma Gabriel * Badges * Menu actions * Do not group by type option * Highligthed state * Fix menu * Item Skeletons * Search list * Omnichannel to virtualList * Sidebar header * SidebarHeader * Better Ominichannel Context usage * Revome livechat template * Remove discussion Room List * alert and open prop * Menu as renderprop * ReactiveUserPresence * Update components * Update cachedCollection * Fiz discussions * update cachedcolletion * Header color * Fix unread * Presence * Fix presence * Fix Admin * [wip] Search bar * get usernames in subscription * Local an spotlight search * Fix avatar id prop * Fix multi users on search * Livechat RoomMenu * Fix Header in anonymous sessions * Fix sidebar * update base old * Sidebar variations * Fix Stories * Sidebar Header * Initial data * Fix paddings * sidebar search * Wip Chats * Added more logic * Virtual List * Fix Memo * switch to VariableSizeList * Fix Size * Te acalma Gabriel * Badges * Menu actions * Do not group by type option * Highligthed state * Item Skeletons * Search list * Fix menu * Omnichannel to virtualList * Sidebar header * SidebarHeader * Better Ominichannel Context usage * Revome livechat template * Remove discussion Room List * alert and open prop * Menu as renderprop * ReactiveUserPresence * Update components * Update cachedCollection * Fiz discussions * update cachedcolletion * Header color * Fix unread * Presence * Fix presence * Fix Admin * [wip] Search bar * get usernames in subscription * Local an spotlight search * Fix avatar id prop * [FIX] Missing "Bio" in user's profile view (#19166) * [FIX] Omnichannel: triggers page not rendering (#19134) * [FIX] VisitorAutoComplete component (#19133) * [FIX] Admin Sidebar overflowing (#19101) * [FIX] Integrations history page not reacting to changes. (#19114) * [FIX] Selecting the same department for multiple units (#19168) * [FIX] Error when editing priority and required description (#19170) * [FIX] Thread view in a channel user haven't joined (#19172) * [FIX] Livechat Appearance label and reset button (#19171) * Refactor: Omnichannel departments (#18920) Co-authored-by: Guilherme Gazzo <guilherme@gazzo.xyz> Co-authored-by: Gabriel Henriques <gabriel.henriques@rocket.chat> Co-authored-by: Guilherme Gazzo <guilhermegazzo@gmail.com> * Fix multi users on search * Livechat RoomMenu * Fix Header in anonymous sessions * Fix sidebar * Fix admin user Info * update base old * fix sidebar size * Fix sidebar tests * Lint * Package-lock * package-lock * Fix callback * Removed useless files * Fix LGTM * Isolate userpresence to dont leak react and fuselage * Fix Alert * update fuselage * fix hide modal not closing * Sort by name and activity * Fix reset * Arrow controls (#19239) Co-authored-by: Guilherme Gazzo <guilherme@gazzo.xyz> * Fixes * ActionButton * ActionButton[2] * ActionButton [3] * Support anonymous * Open menu by keyboard * Login button for anonymous users * Login button for anonymous users * Update code * ShouldUpdate * Change login Icon, fix badge * Update fuselage * Fix storybook * Fix storybook * Use Style and renamed * wip stories sidebar * Types * wip * Testing IE11 * WIP * Fix Typo * Use Layout colors * Lint * Fix * Remove CallProvider * Remove CallContext Co-authored-by: Martin <martin.schoeler@rocket.chat> Co-authored-by: Gabriel Henriques <gabriel.henriques@rocket.chat> Co-authored-by: Douglas Fabris <deefabris@gmail.com> Co-authored-by: gabriellsh <40830821+gabriellsh@users.noreply.github.com> Co-authored-by: Renato Becker <renato.augusto.becker@gmail.com> Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat>
5 years ago
const size = small ? 'small' : 'large';
const t = useTranslation();
switch (status) {
[NEW] User profile and User card (#18194) * Handle Avatar on Error * User Status Component * User Card Component * More variations * More Variations * Loading State * useTimezoneTime Hook * UTCClock Component * Fix BaseAvatar * getStatus Helper * Rewrite User info to reuse + Stories * Changes to open on Channels * ??? * Fix reactAdapters * Translation Provider * Fix lint * Improve loading state * WIP * UserCard and UserInfo Actions * Lint * Review * wip * Fix user info * Update fuselage * Update fuselage 0.13.0 * sad * sad[2] * fix camelCase paths * Fix Ghost menu * Fix some weird behaviors * Fix missing user ID on actions * Fix visual * Fix VerticalBar * Opss missing email field * Missing some fields * Update Fuselage * Update app/theme/client/imports/components/contextual-bar.css Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * Remove Old userInfo template * UserCard Api * Update client/admin/customEmoji/CustomEmojiRoute.js Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * Remove unused variables * Fix contextual-bar CSS selectors * Destructure additional props in UserInfoWithData * Remove obsolete props from VerticalBar * Remove commented code * Place useSetModal hook * Apply suggestions from code review Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * Fiz markdown * Update client/components/basic/UserCard.js Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * Update client/components/basic/avatar/UserAvatar.js Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * rename base avatar Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> Co-authored-by: Gabriel Henriques <gabriel.henriques@rocket.chat>
5 years ago
case 'online':
return <StatusBullet size={size} status={status} title={t('Online')} {...props}/>;
[NEW] User profile and User card (#18194) * Handle Avatar on Error * User Status Component * User Card Component * More variations * More Variations * Loading State * useTimezoneTime Hook * UTCClock Component * Fix BaseAvatar * getStatus Helper * Rewrite User info to reuse + Stories * Changes to open on Channels * ??? * Fix reactAdapters * Translation Provider * Fix lint * Improve loading state * WIP * UserCard and UserInfo Actions * Lint * Review * wip * Fix user info * Update fuselage * Update fuselage 0.13.0 * sad * sad[2] * fix camelCase paths * Fix Ghost menu * Fix some weird behaviors * Fix missing user ID on actions * Fix visual * Fix VerticalBar * Opss missing email field * Missing some fields * Update Fuselage * Update app/theme/client/imports/components/contextual-bar.css Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * Remove Old userInfo template * UserCard Api * Update client/admin/customEmoji/CustomEmojiRoute.js Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * Remove unused variables * Fix contextual-bar CSS selectors * Destructure additional props in UserInfoWithData * Remove obsolete props from VerticalBar * Remove commented code * Place useSetModal hook * Apply suggestions from code review Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * Fiz markdown * Update client/components/basic/UserCard.js Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * Update client/components/basic/avatar/UserAvatar.js Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * rename base avatar Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> Co-authored-by: Gabriel Henriques <gabriel.henriques@rocket.chat>
5 years ago
case 'busy':
return <StatusBullet size={size} status={status} title={t('Busy')} {...props}/>;
[NEW] User profile and User card (#18194) * Handle Avatar on Error * User Status Component * User Card Component * More variations * More Variations * Loading State * useTimezoneTime Hook * UTCClock Component * Fix BaseAvatar * getStatus Helper * Rewrite User info to reuse + Stories * Changes to open on Channels * ??? * Fix reactAdapters * Translation Provider * Fix lint * Improve loading state * WIP * UserCard and UserInfo Actions * Lint * Review * wip * Fix user info * Update fuselage * Update fuselage 0.13.0 * sad * sad[2] * fix camelCase paths * Fix Ghost menu * Fix some weird behaviors * Fix missing user ID on actions * Fix visual * Fix VerticalBar * Opss missing email field * Missing some fields * Update Fuselage * Update app/theme/client/imports/components/contextual-bar.css Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * Remove Old userInfo template * UserCard Api * Update client/admin/customEmoji/CustomEmojiRoute.js Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * Remove unused variables * Fix contextual-bar CSS selectors * Destructure additional props in UserInfoWithData * Remove obsolete props from VerticalBar * Remove commented code * Place useSetModal hook * Apply suggestions from code review Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * Fiz markdown * Update client/components/basic/UserCard.js Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * Update client/components/basic/avatar/UserAvatar.js Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * rename base avatar Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> Co-authored-by: Gabriel Henriques <gabriel.henriques@rocket.chat>
5 years ago
case 'away':
return <StatusBullet size={size} status={status} title={t('Away')} {...props}/>;
case 'offline':
return <StatusBullet size={size} status={status} title={t('Offline')} {...props}/>;
[NEW] User profile and User card (#18194) * Handle Avatar on Error * User Status Component * User Card Component * More variations * More Variations * Loading State * useTimezoneTime Hook * UTCClock Component * Fix BaseAvatar * getStatus Helper * Rewrite User info to reuse + Stories * Changes to open on Channels * ??? * Fix reactAdapters * Translation Provider * Fix lint * Improve loading state * WIP * UserCard and UserInfo Actions * Lint * Review * wip * Fix user info * Update fuselage * Update fuselage 0.13.0 * sad * sad[2] * fix camelCase paths * Fix Ghost menu * Fix some weird behaviors * Fix missing user ID on actions * Fix visual * Fix VerticalBar * Opss missing email field * Missing some fields * Update Fuselage * Update app/theme/client/imports/components/contextual-bar.css Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * Remove Old userInfo template * UserCard Api * Update client/admin/customEmoji/CustomEmojiRoute.js Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * Remove unused variables * Fix contextual-bar CSS selectors * Destructure additional props in UserInfoWithData * Remove obsolete props from VerticalBar * Remove commented code * Place useSetModal hook * Apply suggestions from code review Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * Fiz markdown * Update client/components/basic/UserCard.js Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * Update client/components/basic/avatar/UserAvatar.js Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * rename base avatar Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> Co-authored-by: Gabriel Henriques <gabriel.henriques@rocket.chat>
5 years ago
default:
[IMPROVE] New sidebar layout (#19089) * wip * wip * more work in progress * lint * Fix IE11 support livechat widget * More wip * lint * Add correct buttons and fix some errors * fix import * Fix error with empty department agents * fix title and tags * more fixes * fix agents save * Fix agentlist not saving * First Review * update fuselage * Sidebar variations * Fix Stories * Sidebar Header * Initial data * Fix paddings * sidebar search * Wip Chats * Added more logic * Fix Memo * Virtual List * switch to VariableSizeList * Fix Size * Te acalma Gabriel * Badges * Menu actions * Do not group by type option * Highligthed state * Fix menu * Item Skeletons * Search list * Omnichannel to virtualList * Sidebar header * SidebarHeader * Better Ominichannel Context usage * Revome livechat template * Remove discussion Room List * alert and open prop * Menu as renderprop * ReactiveUserPresence * Update components * Update cachedCollection * Fiz discussions * update cachedcolletion * Header color * Fix unread * Presence * Fix presence * Fix Admin * [wip] Search bar * get usernames in subscription * Local an spotlight search * Fix avatar id prop * Fix multi users on search * Livechat RoomMenu * Fix Header in anonymous sessions * Fix sidebar * update base old * Sidebar variations * Fix Stories * Sidebar Header * Initial data * Fix paddings * sidebar search * Wip Chats * Added more logic * Virtual List * Fix Memo * switch to VariableSizeList * Fix Size * Te acalma Gabriel * Badges * Menu actions * Do not group by type option * Highligthed state * Item Skeletons * Search list * Fix menu * Omnichannel to virtualList * Sidebar header * SidebarHeader * Better Ominichannel Context usage * Revome livechat template * Remove discussion Room List * alert and open prop * Menu as renderprop * ReactiveUserPresence * Update components * Update cachedCollection * Fiz discussions * update cachedcolletion * Header color * Fix unread * Presence * Fix presence * Fix Admin * [wip] Search bar * get usernames in subscription * Local an spotlight search * Fix avatar id prop * [FIX] Missing "Bio" in user's profile view (#19166) * [FIX] Omnichannel: triggers page not rendering (#19134) * [FIX] VisitorAutoComplete component (#19133) * [FIX] Admin Sidebar overflowing (#19101) * [FIX] Integrations history page not reacting to changes. (#19114) * [FIX] Selecting the same department for multiple units (#19168) * [FIX] Error when editing priority and required description (#19170) * [FIX] Thread view in a channel user haven't joined (#19172) * [FIX] Livechat Appearance label and reset button (#19171) * Refactor: Omnichannel departments (#18920) Co-authored-by: Guilherme Gazzo <guilherme@gazzo.xyz> Co-authored-by: Gabriel Henriques <gabriel.henriques@rocket.chat> Co-authored-by: Guilherme Gazzo <guilhermegazzo@gmail.com> * Fix multi users on search * Livechat RoomMenu * Fix Header in anonymous sessions * Fix sidebar * Fix admin user Info * update base old * fix sidebar size * Fix sidebar tests * Lint * Package-lock * package-lock * Fix callback * Removed useless files * Fix LGTM * Isolate userpresence to dont leak react and fuselage * Fix Alert * update fuselage * fix hide modal not closing * Sort by name and activity * Fix reset * Arrow controls (#19239) Co-authored-by: Guilherme Gazzo <guilherme@gazzo.xyz> * Fixes * ActionButton * ActionButton[2] * ActionButton [3] * Support anonymous * Open menu by keyboard * Login button for anonymous users * Login button for anonymous users * Update code * ShouldUpdate * Change login Icon, fix badge * Update fuselage * Fix storybook * Fix storybook * Use Style and renamed * wip stories sidebar * Types * wip * Testing IE11 * WIP * Fix Typo * Use Layout colors * Lint * Fix * Remove CallProvider * Remove CallContext Co-authored-by: Martin <martin.schoeler@rocket.chat> Co-authored-by: Gabriel Henriques <gabriel.henriques@rocket.chat> Co-authored-by: Douglas Fabris <deefabris@gmail.com> Co-authored-by: gabriellsh <40830821+gabriellsh@users.noreply.github.com> Co-authored-by: Renato Becker <renato.augusto.becker@gmail.com> Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat>
5 years ago
return <StatusBullet size={size} title={t('Loading')} {...props}/>;
[NEW] User profile and User card (#18194) * Handle Avatar on Error * User Status Component * User Card Component * More variations * More Variations * Loading State * useTimezoneTime Hook * UTCClock Component * Fix BaseAvatar * getStatus Helper * Rewrite User info to reuse + Stories * Changes to open on Channels * ??? * Fix reactAdapters * Translation Provider * Fix lint * Improve loading state * WIP * UserCard and UserInfo Actions * Lint * Review * wip * Fix user info * Update fuselage * Update fuselage 0.13.0 * sad * sad[2] * fix camelCase paths * Fix Ghost menu * Fix some weird behaviors * Fix missing user ID on actions * Fix visual * Fix VerticalBar * Opss missing email field * Missing some fields * Update Fuselage * Update app/theme/client/imports/components/contextual-bar.css Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * Remove Old userInfo template * UserCard Api * Update client/admin/customEmoji/CustomEmojiRoute.js Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * Remove unused variables * Fix contextual-bar CSS selectors * Destructure additional props in UserInfoWithData * Remove obsolete props from VerticalBar * Remove commented code * Place useSetModal hook * Apply suggestions from code review Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * Fiz markdown * Update client/components/basic/UserCard.js Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * Update client/components/basic/avatar/UserAvatar.js Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * rename base avatar Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> Co-authored-by: Gabriel Henriques <gabriel.henriques@rocket.chat>
5 years ago
}
[IMPROVE] New sidebar layout (#19089) * wip * wip * more work in progress * lint * Fix IE11 support livechat widget * More wip * lint * Add correct buttons and fix some errors * fix import * Fix error with empty department agents * fix title and tags * more fixes * fix agents save * Fix agentlist not saving * First Review * update fuselage * Sidebar variations * Fix Stories * Sidebar Header * Initial data * Fix paddings * sidebar search * Wip Chats * Added more logic * Fix Memo * Virtual List * switch to VariableSizeList * Fix Size * Te acalma Gabriel * Badges * Menu actions * Do not group by type option * Highligthed state * Fix menu * Item Skeletons * Search list * Omnichannel to virtualList * Sidebar header * SidebarHeader * Better Ominichannel Context usage * Revome livechat template * Remove discussion Room List * alert and open prop * Menu as renderprop * ReactiveUserPresence * Update components * Update cachedCollection * Fiz discussions * update cachedcolletion * Header color * Fix unread * Presence * Fix presence * Fix Admin * [wip] Search bar * get usernames in subscription * Local an spotlight search * Fix avatar id prop * Fix multi users on search * Livechat RoomMenu * Fix Header in anonymous sessions * Fix sidebar * update base old * Sidebar variations * Fix Stories * Sidebar Header * Initial data * Fix paddings * sidebar search * Wip Chats * Added more logic * Virtual List * Fix Memo * switch to VariableSizeList * Fix Size * Te acalma Gabriel * Badges * Menu actions * Do not group by type option * Highligthed state * Item Skeletons * Search list * Fix menu * Omnichannel to virtualList * Sidebar header * SidebarHeader * Better Ominichannel Context usage * Revome livechat template * Remove discussion Room List * alert and open prop * Menu as renderprop * ReactiveUserPresence * Update components * Update cachedCollection * Fiz discussions * update cachedcolletion * Header color * Fix unread * Presence * Fix presence * Fix Admin * [wip] Search bar * get usernames in subscription * Local an spotlight search * Fix avatar id prop * [FIX] Missing "Bio" in user's profile view (#19166) * [FIX] Omnichannel: triggers page not rendering (#19134) * [FIX] VisitorAutoComplete component (#19133) * [FIX] Admin Sidebar overflowing (#19101) * [FIX] Integrations history page not reacting to changes. (#19114) * [FIX] Selecting the same department for multiple units (#19168) * [FIX] Error when editing priority and required description (#19170) * [FIX] Thread view in a channel user haven't joined (#19172) * [FIX] Livechat Appearance label and reset button (#19171) * Refactor: Omnichannel departments (#18920) Co-authored-by: Guilherme Gazzo <guilherme@gazzo.xyz> Co-authored-by: Gabriel Henriques <gabriel.henriques@rocket.chat> Co-authored-by: Guilherme Gazzo <guilhermegazzo@gmail.com> * Fix multi users on search * Livechat RoomMenu * Fix Header in anonymous sessions * Fix sidebar * Fix admin user Info * update base old * fix sidebar size * Fix sidebar tests * Lint * Package-lock * package-lock * Fix callback * Removed useless files * Fix LGTM * Isolate userpresence to dont leak react and fuselage * Fix Alert * update fuselage * fix hide modal not closing * Sort by name and activity * Fix reset * Arrow controls (#19239) Co-authored-by: Guilherme Gazzo <guilherme@gazzo.xyz> * Fixes * ActionButton * ActionButton[2] * ActionButton [3] * Support anonymous * Open menu by keyboard * Login button for anonymous users * Login button for anonymous users * Update code * ShouldUpdate * Change login Icon, fix badge * Update fuselage * Fix storybook * Fix storybook * Use Style and renamed * wip stories sidebar * Types * wip * Testing IE11 * WIP * Fix Typo * Use Layout colors * Lint * Fix * Remove CallProvider * Remove CallContext Co-authored-by: Martin <martin.schoeler@rocket.chat> Co-authored-by: Gabriel Henriques <gabriel.henriques@rocket.chat> Co-authored-by: Douglas Fabris <deefabris@gmail.com> Co-authored-by: gabriellsh <40830821+gabriellsh@users.noreply.github.com> Co-authored-by: Renato Becker <renato.augusto.becker@gmail.com> Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat>
5 years ago
});
export const Busy = (props) => <UserStatus status='busy' {...props}/>;
export const Away = (props) => <UserStatus status='away' {...props}/>;
export const Online = (props) => <UserStatus status='online' {...props}/>;
export const Offline = (props) => <UserStatus status='offline' {...props}/>;
export const Loading = (props) => <UserStatus {...props}/>;
export const colors = {
busy: 'danger-500',
away: 'warning-600',
online: 'success-500',
offline: 'neutral-600',
[NEW] User profile and User card (#18194) * Handle Avatar on Error * User Status Component * User Card Component * More variations * More Variations * Loading State * useTimezoneTime Hook * UTCClock Component * Fix BaseAvatar * getStatus Helper * Rewrite User info to reuse + Stories * Changes to open on Channels * ??? * Fix reactAdapters * Translation Provider * Fix lint * Improve loading state * WIP * UserCard and UserInfo Actions * Lint * Review * wip * Fix user info * Update fuselage * Update fuselage 0.13.0 * sad * sad[2] * fix camelCase paths * Fix Ghost menu * Fix some weird behaviors * Fix missing user ID on actions * Fix visual * Fix VerticalBar * Opss missing email field * Missing some fields * Update Fuselage * Update app/theme/client/imports/components/contextual-bar.css Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * Remove Old userInfo template * UserCard Api * Update client/admin/customEmoji/CustomEmojiRoute.js Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * Remove unused variables * Fix contextual-bar CSS selectors * Destructure additional props in UserInfoWithData * Remove obsolete props from VerticalBar * Remove commented code * Place useSetModal hook * Apply suggestions from code review Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * Fiz markdown * Update client/components/basic/UserCard.js Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * Update client/components/basic/avatar/UserAvatar.js Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> * rename base avatar Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat> Co-authored-by: Gabriel Henriques <gabriel.henriques@rocket.chat>
5 years ago
};
[IMPROVE] New sidebar layout (#19089) * wip * wip * more work in progress * lint * Fix IE11 support livechat widget * More wip * lint * Add correct buttons and fix some errors * fix import * Fix error with empty department agents * fix title and tags * more fixes * fix agents save * Fix agentlist not saving * First Review * update fuselage * Sidebar variations * Fix Stories * Sidebar Header * Initial data * Fix paddings * sidebar search * Wip Chats * Added more logic * Fix Memo * Virtual List * switch to VariableSizeList * Fix Size * Te acalma Gabriel * Badges * Menu actions * Do not group by type option * Highligthed state * Fix menu * Item Skeletons * Search list * Omnichannel to virtualList * Sidebar header * SidebarHeader * Better Ominichannel Context usage * Revome livechat template * Remove discussion Room List * alert and open prop * Menu as renderprop * ReactiveUserPresence * Update components * Update cachedCollection * Fiz discussions * update cachedcolletion * Header color * Fix unread * Presence * Fix presence * Fix Admin * [wip] Search bar * get usernames in subscription * Local an spotlight search * Fix avatar id prop * Fix multi users on search * Livechat RoomMenu * Fix Header in anonymous sessions * Fix sidebar * update base old * Sidebar variations * Fix Stories * Sidebar Header * Initial data * Fix paddings * sidebar search * Wip Chats * Added more logic * Virtual List * Fix Memo * switch to VariableSizeList * Fix Size * Te acalma Gabriel * Badges * Menu actions * Do not group by type option * Highligthed state * Item Skeletons * Search list * Fix menu * Omnichannel to virtualList * Sidebar header * SidebarHeader * Better Ominichannel Context usage * Revome livechat template * Remove discussion Room List * alert and open prop * Menu as renderprop * ReactiveUserPresence * Update components * Update cachedCollection * Fiz discussions * update cachedcolletion * Header color * Fix unread * Presence * Fix presence * Fix Admin * [wip] Search bar * get usernames in subscription * Local an spotlight search * Fix avatar id prop * [FIX] Missing "Bio" in user's profile view (#19166) * [FIX] Omnichannel: triggers page not rendering (#19134) * [FIX] VisitorAutoComplete component (#19133) * [FIX] Admin Sidebar overflowing (#19101) * [FIX] Integrations history page not reacting to changes. (#19114) * [FIX] Selecting the same department for multiple units (#19168) * [FIX] Error when editing priority and required description (#19170) * [FIX] Thread view in a channel user haven't joined (#19172) * [FIX] Livechat Appearance label and reset button (#19171) * Refactor: Omnichannel departments (#18920) Co-authored-by: Guilherme Gazzo <guilherme@gazzo.xyz> Co-authored-by: Gabriel Henriques <gabriel.henriques@rocket.chat> Co-authored-by: Guilherme Gazzo <guilhermegazzo@gmail.com> * Fix multi users on search * Livechat RoomMenu * Fix Header in anonymous sessions * Fix sidebar * Fix admin user Info * update base old * fix sidebar size * Fix sidebar tests * Lint * Package-lock * package-lock * Fix callback * Removed useless files * Fix LGTM * Isolate userpresence to dont leak react and fuselage * Fix Alert * update fuselage * fix hide modal not closing * Sort by name and activity * Fix reset * Arrow controls (#19239) Co-authored-by: Guilherme Gazzo <guilherme@gazzo.xyz> * Fixes * ActionButton * ActionButton[2] * ActionButton [3] * Support anonymous * Open menu by keyboard * Login button for anonymous users * Login button for anonymous users * Update code * ShouldUpdate * Change login Icon, fix badge * Update fuselage * Fix storybook * Fix storybook * Use Style and renamed * wip stories sidebar * Types * wip * Testing IE11 * WIP * Fix Typo * Use Layout colors * Lint * Fix * Remove CallProvider * Remove CallContext Co-authored-by: Martin <martin.schoeler@rocket.chat> Co-authored-by: Gabriel Henriques <gabriel.henriques@rocket.chat> Co-authored-by: Douglas Fabris <deefabris@gmail.com> Co-authored-by: gabriellsh <40830821+gabriellsh@users.noreply.github.com> Co-authored-by: Renato Becker <renato.augusto.becker@gmail.com> Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat>
5 years ago
export const usePresence = (uid, presence) => {
const [status, setStatus] = useSafely(useState(presence));
[IMPROVE] New sidebar layout (#19089) * wip * wip * more work in progress * lint * Fix IE11 support livechat widget * More wip * lint * Add correct buttons and fix some errors * fix import * Fix error with empty department agents * fix title and tags * more fixes * fix agents save * Fix agentlist not saving * First Review * update fuselage * Sidebar variations * Fix Stories * Sidebar Header * Initial data * Fix paddings * sidebar search * Wip Chats * Added more logic * Fix Memo * Virtual List * switch to VariableSizeList * Fix Size * Te acalma Gabriel * Badges * Menu actions * Do not group by type option * Highligthed state * Fix menu * Item Skeletons * Search list * Omnichannel to virtualList * Sidebar header * SidebarHeader * Better Ominichannel Context usage * Revome livechat template * Remove discussion Room List * alert and open prop * Menu as renderprop * ReactiveUserPresence * Update components * Update cachedCollection * Fiz discussions * update cachedcolletion * Header color * Fix unread * Presence * Fix presence * Fix Admin * [wip] Search bar * get usernames in subscription * Local an spotlight search * Fix avatar id prop * Fix multi users on search * Livechat RoomMenu * Fix Header in anonymous sessions * Fix sidebar * update base old * Sidebar variations * Fix Stories * Sidebar Header * Initial data * Fix paddings * sidebar search * Wip Chats * Added more logic * Virtual List * Fix Memo * switch to VariableSizeList * Fix Size * Te acalma Gabriel * Badges * Menu actions * Do not group by type option * Highligthed state * Item Skeletons * Search list * Fix menu * Omnichannel to virtualList * Sidebar header * SidebarHeader * Better Ominichannel Context usage * Revome livechat template * Remove discussion Room List * alert and open prop * Menu as renderprop * ReactiveUserPresence * Update components * Update cachedCollection * Fiz discussions * update cachedcolletion * Header color * Fix unread * Presence * Fix presence * Fix Admin * [wip] Search bar * get usernames in subscription * Local an spotlight search * Fix avatar id prop * [FIX] Missing "Bio" in user's profile view (#19166) * [FIX] Omnichannel: triggers page not rendering (#19134) * [FIX] VisitorAutoComplete component (#19133) * [FIX] Admin Sidebar overflowing (#19101) * [FIX] Integrations history page not reacting to changes. (#19114) * [FIX] Selecting the same department for multiple units (#19168) * [FIX] Error when editing priority and required description (#19170) * [FIX] Thread view in a channel user haven't joined (#19172) * [FIX] Livechat Appearance label and reset button (#19171) * Refactor: Omnichannel departments (#18920) Co-authored-by: Guilherme Gazzo <guilherme@gazzo.xyz> Co-authored-by: Gabriel Henriques <gabriel.henriques@rocket.chat> Co-authored-by: Guilherme Gazzo <guilhermegazzo@gmail.com> * Fix multi users on search * Livechat RoomMenu * Fix Header in anonymous sessions * Fix sidebar * Fix admin user Info * update base old * fix sidebar size * Fix sidebar tests * Lint * Package-lock * package-lock * Fix callback * Removed useless files * Fix LGTM * Isolate userpresence to dont leak react and fuselage * Fix Alert * update fuselage * fix hide modal not closing * Sort by name and activity * Fix reset * Arrow controls (#19239) Co-authored-by: Guilherme Gazzo <guilherme@gazzo.xyz> * Fixes * ActionButton * ActionButton[2] * ActionButton [3] * Support anonymous * Open menu by keyboard * Login button for anonymous users * Login button for anonymous users * Update code * ShouldUpdate * Change login Icon, fix badge * Update fuselage * Fix storybook * Fix storybook * Use Style and renamed * wip stories sidebar * Types * wip * Testing IE11 * WIP * Fix Typo * Use Layout colors * Lint * Fix * Remove CallProvider * Remove CallContext Co-authored-by: Martin <martin.schoeler@rocket.chat> Co-authored-by: Gabriel Henriques <gabriel.henriques@rocket.chat> Co-authored-by: Douglas Fabris <deefabris@gmail.com> Co-authored-by: gabriellsh <40830821+gabriellsh@users.noreply.github.com> Co-authored-by: Renato Becker <renato.augusto.becker@gmail.com> Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat>
5 years ago
useEffect(() => {
const handle = ({ status = 'loading' }) => {
[IMPROVE] New sidebar layout (#19089) * wip * wip * more work in progress * lint * Fix IE11 support livechat widget * More wip * lint * Add correct buttons and fix some errors * fix import * Fix error with empty department agents * fix title and tags * more fixes * fix agents save * Fix agentlist not saving * First Review * update fuselage * Sidebar variations * Fix Stories * Sidebar Header * Initial data * Fix paddings * sidebar search * Wip Chats * Added more logic * Fix Memo * Virtual List * switch to VariableSizeList * Fix Size * Te acalma Gabriel * Badges * Menu actions * Do not group by type option * Highligthed state * Fix menu * Item Skeletons * Search list * Omnichannel to virtualList * Sidebar header * SidebarHeader * Better Ominichannel Context usage * Revome livechat template * Remove discussion Room List * alert and open prop * Menu as renderprop * ReactiveUserPresence * Update components * Update cachedCollection * Fiz discussions * update cachedcolletion * Header color * Fix unread * Presence * Fix presence * Fix Admin * [wip] Search bar * get usernames in subscription * Local an spotlight search * Fix avatar id prop * Fix multi users on search * Livechat RoomMenu * Fix Header in anonymous sessions * Fix sidebar * update base old * Sidebar variations * Fix Stories * Sidebar Header * Initial data * Fix paddings * sidebar search * Wip Chats * Added more logic * Virtual List * Fix Memo * switch to VariableSizeList * Fix Size * Te acalma Gabriel * Badges * Menu actions * Do not group by type option * Highligthed state * Item Skeletons * Search list * Fix menu * Omnichannel to virtualList * Sidebar header * SidebarHeader * Better Ominichannel Context usage * Revome livechat template * Remove discussion Room List * alert and open prop * Menu as renderprop * ReactiveUserPresence * Update components * Update cachedCollection * Fiz discussions * update cachedcolletion * Header color * Fix unread * Presence * Fix presence * Fix Admin * [wip] Search bar * get usernames in subscription * Local an spotlight search * Fix avatar id prop * [FIX] Missing "Bio" in user's profile view (#19166) * [FIX] Omnichannel: triggers page not rendering (#19134) * [FIX] VisitorAutoComplete component (#19133) * [FIX] Admin Sidebar overflowing (#19101) * [FIX] Integrations history page not reacting to changes. (#19114) * [FIX] Selecting the same department for multiple units (#19168) * [FIX] Error when editing priority and required description (#19170) * [FIX] Thread view in a channel user haven't joined (#19172) * [FIX] Livechat Appearance label and reset button (#19171) * Refactor: Omnichannel departments (#18920) Co-authored-by: Guilherme Gazzo <guilherme@gazzo.xyz> Co-authored-by: Gabriel Henriques <gabriel.henriques@rocket.chat> Co-authored-by: Guilherme Gazzo <guilhermegazzo@gmail.com> * Fix multi users on search * Livechat RoomMenu * Fix Header in anonymous sessions * Fix sidebar * Fix admin user Info * update base old * fix sidebar size * Fix sidebar tests * Lint * Package-lock * package-lock * Fix callback * Removed useless files * Fix LGTM * Isolate userpresence to dont leak react and fuselage * Fix Alert * update fuselage * fix hide modal not closing * Sort by name and activity * Fix reset * Arrow controls (#19239) Co-authored-by: Guilherme Gazzo <guilherme@gazzo.xyz> * Fixes * ActionButton * ActionButton[2] * ActionButton [3] * Support anonymous * Open menu by keyboard * Login button for anonymous users * Login button for anonymous users * Update code * ShouldUpdate * Change login Icon, fix badge * Update fuselage * Fix storybook * Fix storybook * Use Style and renamed * wip stories sidebar * Types * wip * Testing IE11 * WIP * Fix Typo * Use Layout colors * Lint * Fix * Remove CallProvider * Remove CallContext Co-authored-by: Martin <martin.schoeler@rocket.chat> Co-authored-by: Gabriel Henriques <gabriel.henriques@rocket.chat> Co-authored-by: Douglas Fabris <deefabris@gmail.com> Co-authored-by: gabriellsh <40830821+gabriellsh@users.noreply.github.com> Co-authored-by: Renato Becker <renato.augusto.becker@gmail.com> Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat>
5 years ago
setStatus(status);
};
Presence.listen(uid, handle);
return () => {
Presence.stop(uid, handle);
};
}, [setStatus, uid]);
[IMPROVE] New sidebar layout (#19089) * wip * wip * more work in progress * lint * Fix IE11 support livechat widget * More wip * lint * Add correct buttons and fix some errors * fix import * Fix error with empty department agents * fix title and tags * more fixes * fix agents save * Fix agentlist not saving * First Review * update fuselage * Sidebar variations * Fix Stories * Sidebar Header * Initial data * Fix paddings * sidebar search * Wip Chats * Added more logic * Fix Memo * Virtual List * switch to VariableSizeList * Fix Size * Te acalma Gabriel * Badges * Menu actions * Do not group by type option * Highligthed state * Fix menu * Item Skeletons * Search list * Omnichannel to virtualList * Sidebar header * SidebarHeader * Better Ominichannel Context usage * Revome livechat template * Remove discussion Room List * alert and open prop * Menu as renderprop * ReactiveUserPresence * Update components * Update cachedCollection * Fiz discussions * update cachedcolletion * Header color * Fix unread * Presence * Fix presence * Fix Admin * [wip] Search bar * get usernames in subscription * Local an spotlight search * Fix avatar id prop * Fix multi users on search * Livechat RoomMenu * Fix Header in anonymous sessions * Fix sidebar * update base old * Sidebar variations * Fix Stories * Sidebar Header * Initial data * Fix paddings * sidebar search * Wip Chats * Added more logic * Virtual List * Fix Memo * switch to VariableSizeList * Fix Size * Te acalma Gabriel * Badges * Menu actions * Do not group by type option * Highligthed state * Item Skeletons * Search list * Fix menu * Omnichannel to virtualList * Sidebar header * SidebarHeader * Better Ominichannel Context usage * Revome livechat template * Remove discussion Room List * alert and open prop * Menu as renderprop * ReactiveUserPresence * Update components * Update cachedCollection * Fiz discussions * update cachedcolletion * Header color * Fix unread * Presence * Fix presence * Fix Admin * [wip] Search bar * get usernames in subscription * Local an spotlight search * Fix avatar id prop * [FIX] Missing "Bio" in user's profile view (#19166) * [FIX] Omnichannel: triggers page not rendering (#19134) * [FIX] VisitorAutoComplete component (#19133) * [FIX] Admin Sidebar overflowing (#19101) * [FIX] Integrations history page not reacting to changes. (#19114) * [FIX] Selecting the same department for multiple units (#19168) * [FIX] Error when editing priority and required description (#19170) * [FIX] Thread view in a channel user haven't joined (#19172) * [FIX] Livechat Appearance label and reset button (#19171) * Refactor: Omnichannel departments (#18920) Co-authored-by: Guilherme Gazzo <guilherme@gazzo.xyz> Co-authored-by: Gabriel Henriques <gabriel.henriques@rocket.chat> Co-authored-by: Guilherme Gazzo <guilhermegazzo@gmail.com> * Fix multi users on search * Livechat RoomMenu * Fix Header in anonymous sessions * Fix sidebar * Fix admin user Info * update base old * fix sidebar size * Fix sidebar tests * Lint * Package-lock * package-lock * Fix callback * Removed useless files * Fix LGTM * Isolate userpresence to dont leak react and fuselage * Fix Alert * update fuselage * fix hide modal not closing * Sort by name and activity * Fix reset * Arrow controls (#19239) Co-authored-by: Guilherme Gazzo <guilherme@gazzo.xyz> * Fixes * ActionButton * ActionButton[2] * ActionButton [3] * Support anonymous * Open menu by keyboard * Login button for anonymous users * Login button for anonymous users * Update code * ShouldUpdate * Change login Icon, fix badge * Update fuselage * Fix storybook * Fix storybook * Use Style and renamed * wip stories sidebar * Types * wip * Testing IE11 * WIP * Fix Typo * Use Layout colors * Lint * Fix * Remove CallProvider * Remove CallContext Co-authored-by: Martin <martin.schoeler@rocket.chat> Co-authored-by: Gabriel Henriques <gabriel.henriques@rocket.chat> Co-authored-by: Douglas Fabris <deefabris@gmail.com> Co-authored-by: gabriellsh <40830821+gabriellsh@users.noreply.github.com> Co-authored-by: Renato Becker <renato.augusto.becker@gmail.com> Co-authored-by: Tasso Evangelista <tasso.evangelista@rocket.chat>
5 years ago
return status;
};
export const ReactiveUserStatus = React.memo(({ uid, presence, ...props }) => {
const status = usePresence(uid, presence);
return <UserStatus status={status} {...props} />;
});