1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
unleash.unleash/frontend/src/component/signOnLog/SignOnLog.tsx

21 lines
708 B
TypeScript
Raw Normal View History

import { useContext } from 'react';
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 { SignOnLogTable } from './SignOnLogTable/SignOnLogTable';
export const SignOnLog = () => {
const { hasAccess } = useContext(AccessContext);
return (
<div>
<ConditionallyRender
condition={hasAccess(ADMIN)}
show={<SignOnLogTable />}
elseShow={<AdminAlert />}
/>
</div>
);
};