mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-09 00:18:00 +01:00
Currently our bundle size is clocking in at: 1,798.28 kB │ gzip: 558.42 kB After the changes: 1,299.32 kB │ gzip: 403.26 kB
25 lines
806 B
TypeScript
25 lines
806 B
TypeScript
import { useContext } from 'react';
|
|
import UsersList from './UsersList/UsersList';
|
|
import AccessContext from 'contexts/AccessContext';
|
|
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
|
|
import { ADMIN } from 'component/providers/AccessProvider/permissions';
|
|
import { AdminAlert } from 'component/common/AdminAlert/AdminAlert';
|
|
import { InviteLinkBar } from './InviteLinkBar/InviteLinkBar';
|
|
|
|
export const UsersAdmin = () => {
|
|
const { hasAccess } = useContext(AccessContext);
|
|
|
|
return (
|
|
<div>
|
|
<InviteLinkBar />
|
|
<ConditionallyRender
|
|
condition={hasAccess(ADMIN)}
|
|
show={<UsersList />}
|
|
elseShow={<AdminAlert />}
|
|
/>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default UsersAdmin;
|