diff --git a/src/reportWebVitals.ts b/src/reportWebVitals.ts index c96ca2e6..86f04a92 100644 --- a/src/reportWebVitals.ts +++ b/src/reportWebVitals.ts @@ -2,12 +2,12 @@ import { ReportHandler } from 'web-vitals'; export 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); + import('web-vitals').then(({ onCLS, onFID, onFCP, onLCP, onTTFB }) => { + onCLS(onPerfEntry); + onFID(onPerfEntry); + onFCP(onPerfEntry); + onLCP(onPerfEntry); + onTTFB(onPerfEntry); }); } };