From 19f39365b7ef4b3d6ca65185f280a2d6d023004c Mon Sep 17 00:00:00 2001 From: wheattoast11 Date: Sat, 30 Nov 2024 13:56:29 -0600 Subject: [PATCH] updated app.jsx --- src/App.jsx | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index 6a3ba4a..b22f645 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -11,18 +11,29 @@ const Manifesto = lazy(() => import('./pages/Manifesto')); function App() { useEffect(() => { - reportWebVitals(console.log); - if ('performance' in window) { window.performance.mark('app_start'); } + + const logWebVitals = (metric) => { + console.log('Web Vital:', metric); + if (metric.value > 0) { + console.log('Metric details:', { + name: metric.name, + value: metric.value, + rating: metric.rating + }); + } + }; + + reportWebVitals(logWebVitals); }, []); return ( - }> + } /> } />