openreplay/frontend/app/components/ui/NoSessionPermission/NoSessionPermission.tsx
2021-12-08 20:36:38 +05:30

27 lines
No EOL
923 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import React from 'react';
import stl from './NoSessionPermission.css'
import { Icon, Button, Link } from 'UI';
import { connect } from 'react-redux';
interface Props {
session: any
}
function NoSessionPermission({ session }: Props) {
return (
<div className={stl.wrapper}>
<Icon name="shield-lock" size="50" className="py-16"/>
<div className={ stl.title }>Not allowed</div>
{ session.isLive ?
<span>This session is still live, and you dont have the necessary permissions to access this feature. Please check with your admin.</span> :
<span>You dont have the necessary permissions to access this feature. Please check with your admin.</span>
}
<Link to="/">
<Button primary className="mt-6">GO BACK</Button>
</Link>
</div>
);
}
export default connect(state => ({
session: state.getIn([ 'sessions', 'current' ]),
}))(NoSessionPermission);