UserInvitePage.tsx 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. import React, { FC } from 'react';
  2. import { connect } from 'react-redux';
  3. import { NavModel } from '@grafana/data';
  4. import Page from 'app/core/components/Page/Page';
  5. import { contextSrv } from 'app/core/core';
  6. import { getNavModel } from 'app/core/selectors/navModel';
  7. import { StoreState } from 'app/types/store';
  8. import UserInviteForm from './UserInviteForm';
  9. interface Props {
  10. navModel: NavModel;
  11. }
  12. export const UserInvitePage: FC<Props> = ({ navModel }) => {
  13. return (
  14. <Page navModel={navModel}>
  15. <Page.Contents>
  16. <h3 className="page-sub-heading">Invite user</h3>
  17. <div className="p-b-2">
  18. Send invitation or add existing Grafana user to the organization.
  19. <span className="highlight-word"> {contextSrv.user.orgName}</span>
  20. </div>
  21. <UserInviteForm />
  22. </Page.Contents>
  23. </Page>
  24. );
  25. };
  26. const mapStateToProps = (state: StoreState) => ({
  27. navModel: getNavModel(state.navIndex, 'users'),
  28. });
  29. export default connect(mapStateToProps)(UserInvitePage);