1
Fork 0
mirror of https://github.com/pds-nest/nest.git synced 2024-11-22 21:14:18 +00:00
pds-2021-g2-nest/code/frontend/src/reportWebVitals.js

14 lines
395 B
JavaScript
Raw Normal View History

2021-04-20 22:07:39 +00:00
const reportWebVitals = onPerfEntry => {
2021-04-20 22:09:13 +00:00
if(onPerfEntry && onPerfEntry instanceof Function) {
import("web-vitals").then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
getCLS(onPerfEntry)
getFID(onPerfEntry)
getFCP(onPerfEntry)
getLCP(onPerfEntry)
getTTFB(onPerfEntry)
})
}
}
2021-04-20 22:07:39 +00:00
2021-04-20 22:09:13 +00:00
export default reportWebVitals