diff options
| author | Navan Chauhan <navanchauhan@gmail.com> | 2025-04-27 22:44:20 -0600 | 
|---|---|---|
| committer | Navan Chauhan <navanchauhan@gmail.com> | 2025-04-27 22:44:20 -0600 | 
| commit | 37787895d56888ab44362252f21fb05c05e97250 (patch) | |
| tree | 5ff7eaababa6fffd5dc950920f521c5f242010af /client/src/utils | |
| parent | f32142947b853076889801913d47b8c2c0f4f456 (diff) | |
reorganize
Diffstat (limited to 'client/src/utils')
| -rw-r--r-- | client/src/utils/reportWebVitals.js | 13 | 
1 files changed, 13 insertions, 0 deletions
diff --git a/client/src/utils/reportWebVitals.js b/client/src/utils/reportWebVitals.js new file mode 100644 index 0000000..5253d3a --- /dev/null +++ b/client/src/utils/reportWebVitals.js @@ -0,0 +1,13 @@ +const reportWebVitals = onPerfEntry => { +  if (onPerfEntry && onPerfEntry instanceof Function) { +    import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { +      getCLS(onPerfEntry); +      getFID(onPerfEntry); +      getFCP(onPerfEntry); +      getLCP(onPerfEntry); +      getTTFB(onPerfEntry); +    }); +  } +}; + +export default reportWebVitals;  | 
