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

32 lines
833 B

import React, { FunctionComponent } from 'react';
import { GroupId } from '../../../definition/ISetting';
import { useSettingStructure } from '../../contexts/SettingsContext';
import AssetsGroupPage from './groups/AssetsGroupPage';
import OAuthGroupPage from './groups/OAuthGroupPage';
import GenericGroupPage from './groups/GenericGroupPage';
import GroupPage from './GroupPage';
type GroupSelectorProps = {
groupId: GroupId;
};
const GroupSelector: FunctionComponent<GroupSelectorProps> = ({ groupId }) => {
const group = useSettingStructure(groupId);
if (!group) {
return <GroupPage.Skeleton />;
}
if (groupId === 'Assets') {
return <AssetsGroupPage {...group} />;
}
if (groupId === 'OAuth') {
return <OAuthGroupPage {...group} />;
}
return <GenericGroupPage {...group} />;
};
export default GroupSelector;