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/app/push-notifications/client/tabBar.ts

23 lines
658 B

import { lazy, useMemo } from 'react';
import { useUserSubscription } from '@rocket.chat/ui-contexts';
import { addAction } from '../../../client/views/room/lib/Toolbox';
addAction('push-notifications', ({ room }) => {
const subscription = useUserSubscription(room?._id);
return useMemo(
() =>
subscription
? {
groups: ['channel', 'group', 'direct', 'direct_multiple', 'team'],
id: 'push-notifications',
title: 'Notifications_Preferences',
icon: 'bell',
template: lazy(() => import('../../../client/views/room/contextualBar/NotificationPreferences')),
order: 8,
}
: null,
[subscription],
);
});