NotificationsPage.tsx 921 B

12345678910111213141516171819202122232425262728293031
  1. import React from 'react';
  2. import { connect, ConnectedProps } from 'react-redux';
  3. import Page from '../../core/components/Page/Page';
  4. import { GrafanaRouteComponentProps } from '../../core/navigation/types';
  5. import { getNavModel } from '../../core/selectors/navModel';
  6. import { StoreState } from '../../types';
  7. import { StoredNotifications } from './StoredNotifications';
  8. const mapStateToProps = (state: StoreState) => ({
  9. navModel: getNavModel(state.navIndex, 'notifications'),
  10. });
  11. const connector = connect(mapStateToProps, undefined);
  12. interface OwnProps extends GrafanaRouteComponentProps {}
  13. type Props = OwnProps & ConnectedProps<typeof connector>;
  14. export const NotificationsPage = ({ navModel }: Props) => {
  15. return (
  16. <Page navModel={navModel}>
  17. <Page.Contents>
  18. <StoredNotifications />
  19. </Page.Contents>
  20. </Page>
  21. );
  22. };
  23. export default connect(mapStateToProps)(NotificationsPage);