securityos/node_modules/next/dist/esm/client/web-vitals.js

16 lines
491 B
JavaScript
Raw Normal View History

2024-09-06 15:32:35 +00:00
import { useEffect } from "react";
import { onLCP, onFID, onCLS, onINP, onFCP, onTTFB } from "next/dist/compiled/web-vitals";
export function useReportWebVitals(reportWebVitalsFn) {
useEffect(()=>{
onCLS(reportWebVitalsFn);
onFID(reportWebVitalsFn);
onLCP(reportWebVitalsFn);
onINP(reportWebVitalsFn);
onFCP(reportWebVitalsFn);
onTTFB(reportWebVitalsFn);
}, [
reportWebVitalsFn
]);
}
//# sourceMappingURL=web-vitals.js.map