todo
1import { ReportHandler } from 'web-vitals';
2
3const reportWebVitals = (onPerfEntry?: ReportHandler) => {
4if (onPerfEntry && onPerfEntry instanceof Function) {
5import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
6getCLS(onPerfEntry);
7getFID(onPerfEntry);
8getFCP(onPerfEntry);
9getLCP(onPerfEntry);
10getTTFB(onPerfEntry);
11});
12}
13};
14
15export default reportWebVitals;
16