openreplay/frontend/app/layout/TopRight.tsx
Rajesh Rajendran b18e3c4814
V1.15.0 pr (#1657)
* chore(helm): Updating frontend image release

* fix(ui): api delete request with empty params

* Assist clean up (#1654)

* feat(backend): moved http metrics into assist handlers file

* fix(assist): use correct value for requests_duration metric

* feat(assist): removed unnecessary imports

* fix(assist): fixed typo in repond method

* fix(assist): added metrics.js to clean script

* feat(assist): try to save http method asap in server logic

* feat(assist): final version

* feat(assist): removed prom-client from peers and sourcemap-reader

* feat(sourcemap-reader): added missing package-lock.json

* fix(assist): fixed metrics import in assist

* fix(assist): fixed metrics import in assist-ee

* fix(ui): header top right button alignment

* chore(helm): Updating frontend image release

* chore(helm): Updating assist image release

* chore(helm): Updating peers image release

* chore(helm): Updating sourcemapreader image release

---------

Co-authored-by: Shekar Siri <sshekarsiri@gmail.com>
Co-authored-by: Alexander <zavorotynskiy@pm.me>
2023-11-14 15:45:06 +01:00

50 lines
No EOL
1.5 KiB
TypeScript

import React from 'react';
import GettingStartedProgress from 'Shared/GettingStarted/GettingStartedProgress';
import Notifications from 'Components/Alerts/Notifications/Notifications';
import HealthStatus from 'Components/Header/HealthStatus';
import { getInitials } from 'App/utils';
import UserMenu from 'Components/Header/UserMenu/UserMenu';
import { connect } from 'react-redux';
import { Popover, Space } from 'antd';
import ProjectDropdown from 'Shared/ProjectDropdown';
interface Props {
account: any;
siteId: any;
sites: any;
boardingCompletion: any;
}
function TopRight(props: Props) {
const { account } = props;
// @ts-ignore
return (
<Space style={{ lineHeight: '0'}}>
<ProjectDropdown />
<GettingStartedProgress />
<Notifications />
{account.name ? <HealthStatus /> : null}
<Popover content={<UserMenu />} placement={'topRight'}>
<div className='flex items-center cursor-pointer'>
<div className='bg-tealx rounded-full flex items-center justify-center color-white' style={{ width: '32px', height: '32px'}}>
{getInitials(account.name)}
</div>
</div>
</Popover>
</Space>
);
}
function mapStateToProps(state: any) {
return {
account: state.getIn(['user', 'account']),
siteId: state.getIn(['site', 'siteId']),
sites: state.getIn(['site', 'list']),
boardingCompletion: state.getIn(['dashboard', 'boardingCompletion'])
};
}
export default connect(mapStateToProps)(TopRight);