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/admin/settings/GroupSelector.js

22 lines
631 B

import React, { useMemo } from 'react';
import { AssetsGroupPage } from './groups/AssetsGroupPage';
import { OAuthGroupPage } from './groups/OAuthGroupPage';
import { GenericGroupPage } from './groups/GenericGroupPage';
import { useGroup } from './SettingsState';
export function GroupSelector({ groupId }) {
const group = useGroup(groupId);
const children = useMemo(() => {
if (!group) {
return null;
}
return (group._id === 'Assets' && <AssetsGroupPage group={group} />)
|| (group._id === 'OAuth' && <OAuthGroupPage group={group} />)
|| <GenericGroupPage group={group} />;
}, [group]);
return children;
}