2022-02-25 16:57:08 +05:00
|
|
|
export const reportWebVitals = onPerfEntry => {
|
2021-03-31 15:54:02 +05:00
|
|
|
if (onPerfEntry && onPerfEntry instanceof Function) {
|
|
|
|
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
|
2022-02-25 16:57:08 +05:00
|
|
|
getCLS(onPerfEntry)
|
|
|
|
getFID(onPerfEntry)
|
|
|
|
getFCP(onPerfEntry)
|
|
|
|
getLCP(onPerfEntry)
|
|
|
|
getTTFB(onPerfEntry)
|
|
|
|
})
|
2021-03-31 15:54:02 +05:00
|
|
|
}
|
2022-02-25 16:57:08 +05:00
|
|
|
}
|
2021-03-31 15:54:02 +05:00
|
|
|
|
2022-02-25 16:57:08 +05:00
|
|
|
export default reportWebVitals
|