react-native-acoustic-connect-beta
Version:
BETA: React native plugin for Acoustic Connect
40 lines (38 loc) • 1.28 kB
JavaScript
"use strict";
/********************************************************************************************
* 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.
********************************************************************************************/
import { Component } from "react";
import TLTRN from "../TLTRN";
class ConnectProfiler extends 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.logCustomEvent("Load Time", {
profileName,
pageLoadTime
}, 1);
}
}
render() {
return this.props.children;
}
}
export default ConnectProfiler;
//# sourceMappingURL=ConnectProfiler.js.map