@atlaskit/profilecard
Version:
A React component to display a card with user information.
28 lines • 1.2 kB
JavaScript
import React, { useEffect } from 'react';
import { useIntl } from 'react-intl-next';
import EmptyState from '@atlaskit/empty-state';
import messages from '../../messages';
import { AccessLockSVGWrapper, TeamForbiddenErrorStateWrapper } from '../../styled/TeamCard';
import { PACKAGE_META_DATA } from '../../util/analytics';
import { getPageTime } from '../../util/performance';
import AccessLockSVG from '../Error/AccessLockSVG';
export default (props => {
const {
analytics
} = props;
const intl = useIntl();
useEffect(() => {
analytics('ui.teamProfileCard.rendered.error', duration => ({
duration,
firedAt: Math.round(getPageTime()),
...PACKAGE_META_DATA
}));
}, [analytics]);
return /*#__PURE__*/React.createElement(TeamForbiddenErrorStateWrapper, {
testId: "team-profilecard-forbidden-error-state"
}, /*#__PURE__*/React.createElement(EmptyState, {
header: intl.formatMessage(messages.teamForbiddenErrorStateTitle),
description: intl.formatMessage(messages.teamForbiddenErrorStateDescription),
renderImage: () => /*#__PURE__*/React.createElement(AccessLockSVGWrapper, null, /*#__PURE__*/React.createElement(AccessLockSVG, null))
}));
});