diff options
author | Navan Chauhan <navanchauhan@gmail.com> | 2025-04-27 12:03:11 -0600 |
---|---|---|
committer | Navan Chauhan <navanchauhan@gmail.com> | 2025-04-27 12:03:11 -0600 |
commit | 9b54bad317b69d17134ddc27a5570984fba15826 (patch) | |
tree | 333e020e74fc0f423b958598c78b1d202dd2506c /client/src/reportWebVitals.js | |
parent | fa745c47d1fc08e149fb827b022dd19bb527092b (diff) |
initial commit - client
Diffstat (limited to 'client/src/reportWebVitals.js')
-rw-r--r-- | client/src/reportWebVitals.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/client/src/reportWebVitals.js b/client/src/reportWebVitals.js new file mode 100644 index 0000000..5253d3a --- /dev/null +++ b/client/src/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; |