Skip to content

Commit

Permalink
Fix App.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
aelassas committed Nov 16, 2024
1 parent 1b811c4 commit b459774
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import React, { lazy, Suspense } from 'react'
import { BrowserRouter as Router, Route, Routes } from 'react-router-dom'
import { Route, Routes } from 'react-router-dom'
import env from '@/config/env.config'
import { GlobalProvider } from '@/context/GlobalContext'
import { init as initGA } from '@/common/ga4'
import SuspenseRouter from './components/SuspenseRouter'

if (env.GOOGLE_ANALYTICS_ENABLED) {
initGA()
Expand Down Expand Up @@ -31,7 +32,7 @@ const Suppliers = lazy(() => import('@/pages/Suppliers'))

const App = () => (
<GlobalProvider>
<Router>
<SuspenseRouter window={window}>
<div className="app">
<Suspense fallback={<></>}>
<Routes>
Expand Down Expand Up @@ -59,7 +60,7 @@ const App = () => (
</Routes>
</Suspense>
</div>
</Router>
</SuspenseRouter>
</GlobalProvider>
)

Expand Down

0 comments on commit b459774

Please sign in to comment.