UNPKG

react-native-acoustic-connect-beta

Version:

BETA: React native plugin for Acoustic Connect

45 lines (43 loc) 1.51 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _react = require("react"); var _TLTRN = _interopRequireDefault(require("../TLTRN")); function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } /******************************************************************************************** * Copyright (C) 2025 Acoustic, L.P. All rights reserved. * * NOTICE: This file contains material that is confidential and proprietary to * Acoustic, L.P. and/or other developers. No license is granted under any intellectual or * industrial property rights of Acoustic, L.P. except as may be provided in an agreement with * Acoustic, L.P. Any unauthorized copying or distribution of content from this file is * prohibited. ********************************************************************************************/ class ConnectProfiler extends _react.Component { startTime = 0; endTime = 0; constructor(props) { super(props); this.startTime = new Date().getTime(); } componentDidMount() { this.endTime = new Date().getTime(); const pageLoadTime = this.endTime - this.startTime; const { profileName } = this.props; if (profileName) { _TLTRN.default.logCustomEvent("Load Time", { profileName, pageLoadTime }, 1); } } render() { return this.props.children; } } var _default = exports.default = ConnectProfiler; //# sourceMappingURL=ConnectProfiler.js.map