Skip to content

Commit

Permalink
Update PdfPage.jsx
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandEdara authored Jun 16, 2023
1 parent 1ed422f commit 8322b97
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions client/app/reader/PdfPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import { bindActionCreators } from 'redux';
import { PDF_PAGE_HEIGHT, PDF_PAGE_WIDTH, SEARCH_BAR_HEIGHT, PAGE_DIMENSION_SCALE, PAGE_MARGIN } from './constants';
import { pageNumberOfPageIndex } from './utils';
import * as PDFJS from 'pdfjs-dist';
import { collectHistogram } from '../util/Metrics';

import { collectHistogram, recordMetrics } from '../util/Metrics';
import uuid from 'uuid';
import { css } from 'glamor';
import classNames from 'classnames';
import { COLORS } from '../constants/AppConstants';
Expand Down Expand Up @@ -136,7 +136,22 @@ export class PdfPage extends React.PureComponent {
};

componentDidMount = () => {
console.log('Component Did Mount Successfully!')
this.setUpPage();

const readerData = {
uuid: uuid.v4(),
data: {
documentId: this.props.documentId,
documentType: this.props.documentType,
file: PropTypes.string
},
message: 'Render Document Content',
type: 'performance',
product: 'pdfjs.document.render',

};
recordMetrics(this.render(),readerData);
};

componentWillUnmount = () => {
Expand Down

0 comments on commit 8322b97

Please sign in to comment.