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

37 lines
958 B

import React, { FunctionComponent } from 'react';
import { GroupId } from '../../../../definition/ISetting';
import { useSettingStructure } from '../../../contexts/SettingsContext';
import GroupPage from './GroupPage';
import AssetsGroupPage from './groups/AssetsGroupPage';
import LDAPGroupPage from './groups/LDAPGroupPage';
import OAuthGroupPage from './groups/OAuthGroupPage';
import TabbedGroupPage from './groups/TabbedGroupPage';
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} />;
}
if (groupId === 'LDAP') {
return <LDAPGroupPage {...group} />;
}
return <TabbedGroupPage {...group} />;
};
export default GroupSelector;