Skip to content

Commit

Permalink
updated app.jsx
Browse files Browse the repository at this point in the history
  • Loading branch information
wheattoast11 committed Nov 30, 2024
1 parent 0806851 commit 19f3936
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<ErrorBoundary>
<Router>
<Canvas />
<Suspense fallback={<LoadingState />}>
<Canvas />
<Routes>
<Route path="/" element={<Home />} />
<Route path="/manifesto" element={<Manifesto />} />
Expand Down

0 comments on commit 19f3936

Please sign in to comment.