+ } />
} />
} />
} />
@@ -120,6 +121,9 @@ const SandstoneApp = kind({
} />
+
+
+
)
});
diff --git a/src/index.js b/src/index.js
index 34bfb81..ba69a6d 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,6 +1,7 @@
import {createRoot} from 'react-dom/client';
import AgateApp from './App/Agate-App.js';
import SandstoneApp from './App/Sandstone-App.js';
+import reportWebVitals from './reportWebVitals';
let appElement;
@@ -21,3 +22,10 @@ if (typeof window !== 'undefined') {
}
export default appElement;
+
+reportWebVitals((value) => {
+ const vitals = document.getElementById(value.name);
+ vitals.innerHTML = value.value;
+
+ console.log(value);
+});
\ No newline at end of file
diff --git a/src/reportWebVitals.js b/src/reportWebVitals.js
new file mode 100644
index 0000000..f1d128e
--- /dev/null
+++ b/src/reportWebVitals.js
@@ -0,0 +1,11 @@
+const reportWebVitals = onPerfEntry => {
+ if (onPerfEntry && onPerfEntry instanceof Function) {
+ import('web-vitals').then(({ onINP, onFCP, onLCP }) => {
+ onINP(onPerfEntry);
+ onFCP(onPerfEntry);
+ onLCP(onPerfEntry);
+ });
+ }
+ };
+
+export default reportWebVitals;