| Total Complexity | 1 |
| Complexity/F | 0 |
| Lines of Code | 16 |
| Function Count | 0 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import { ReportHandler } from 'web-vitals'; |
||
| 2 | |||
| 3 | const reportWebVitals = (onPerfEntry?: ReportHandler) => { |
||
| 4 | if (onPerfEntry && onPerfEntry instanceof Function) { |
||
| 5 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { |
||
| 6 | getCLS(onPerfEntry); |
||
| 7 | getFID(onPerfEntry); |
||
| 8 | getFCP(onPerfEntry); |
||
| 9 | getLCP(onPerfEntry); |
||
| 10 | getTTFB(onPerfEntry); |
||
| 11 | }); |
||
| 12 | } |
||
| 13 | }; |
||
| 14 | |||
| 15 | export default reportWebVitals; |
||
| 16 |