diff --git a/src/reportWebVitals.ts b/src/reportWebVitals.ts index c1b5276..93e6ae6 100644 --- a/src/reportWebVitals.ts +++ b/src/reportWebVitals.ts @@ -2,12 +2,12 @@ import { ReportCallback } from 'web-vitals'; const reportWebVitals = (onPerfEntry?: ReportCallback): void => { 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); }); } };