From ce2bfde12d288e0bae65376accfc6fcaddb15b9b Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Tue, 22 Jun 2021 10:48:44 +1000 Subject: [PATCH] Remove webvitals --- examples/eth-dm/src/index.tsx | 6 ------ examples/eth-dm/src/reportWebVitals.ts | 15 --------------- 2 files changed, 21 deletions(-) delete mode 100644 examples/eth-dm/src/reportWebVitals.ts diff --git a/examples/eth-dm/src/index.tsx b/examples/eth-dm/src/index.tsx index ef2edf8ea3..6832e7832b 100644 --- a/examples/eth-dm/src/index.tsx +++ b/examples/eth-dm/src/index.tsx @@ -2,7 +2,6 @@ import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; import App from './App'; -import reportWebVitals from './reportWebVitals'; ReactDOM.render( @@ -10,8 +9,3 @@ ReactDOM.render( , document.getElementById('root') ); - -// If you want to start measuring performance in your app, pass a function -// to log results (for example: reportWebVitals(console.log)) -// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals -reportWebVitals(); diff --git a/examples/eth-dm/src/reportWebVitals.ts b/examples/eth-dm/src/reportWebVitals.ts deleted file mode 100644 index 49a2a16e0f..0000000000 --- a/examples/eth-dm/src/reportWebVitals.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { ReportHandler } from 'web-vitals'; - -const reportWebVitals = (onPerfEntry?: ReportHandler) => { - if (onPerfEntry && onPerfEntry instanceof Function) { - import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { - getCLS(onPerfEntry); - getFID(onPerfEntry); - getFCP(onPerfEntry); - getLCP(onPerfEntry); - getTTFB(onPerfEntry); - }); - } -}; - -export default reportWebVitals;