summaryrefslogtreecommitdiff
path: root/frontend/src/reportWebVitals.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/reportWebVitals.tsx')
-rw-r--r--frontend/src/reportWebVitals.tsx13
1 files changed, 13 insertions, 0 deletions
diff --git a/frontend/src/reportWebVitals.tsx b/frontend/src/reportWebVitals.tsx
new file mode 100644
index 0000000..f00fe6c
--- /dev/null
+++ b/frontend/src/reportWebVitals.tsx
@@ -0,0 +1,13 @@
+const reportWebVitals = (onPerfEntry: any) => {
+ 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;