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/federationDashboard/ServersSection.js

26 lines
609 B

import { Box, Throbber } from '@rocket.chat/fuselage';
import React from 'react';
import { usePolledMethodData, AsyncState } from '../../contexts/ServerContext';
function ServersSection() {
const [serversData, serversStatus] = usePolledMethodData('federation:getServers', [], 10000);
if (serversStatus === AsyncState.LOADING) {
return <Throbber align='center' />;
}
if (serversData?.data?.length === 0) {
return null;
}
return <Box withRichContent>
<ul>
{serversData?.data?.map(({ domain }) => (
<li key={domain}>{domain}</li>
))}
</ul>
</Box>;
}
export default ServersSection;