forked from ddrilling/asb_cloud_front
13 lines
323 B
TypeScript
13 lines
323 B
TypeScript
|
import { getCLS, getFID, getFCP, getLCP, getTTFB, ReportHandler } from 'web-vitals'
|
||
|
|
||
|
export const reportWebVitals = (onPerfEntry?: ReportHandler) => {
|
||
|
if (!onPerfEntry) return
|
||
|
getCLS(onPerfEntry)
|
||
|
getFID(onPerfEntry)
|
||
|
getFCP(onPerfEntry)
|
||
|
getLCP(onPerfEntry)
|
||
|
getTTFB(onPerfEntry)
|
||
|
}
|
||
|
|
||
|
export default reportWebVitals
|