forked from solidjs/solid-site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
32 lines (29 loc) · 876 Bytes
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import { Suspense } from 'solid-js';
import { useRoutes, Router } from 'solid-app-router';
import { routes } from './routes';
import Header from './components/Header';
import { AppContextProvider } from './AppContext';
import { preventSmoothScrollOnTabbing } from './utils';
export const App = () => {
const Routes = useRoutes(routes);
preventSmoothScrollOnTabbing();
return (
<main class="min-h-screen">
<Router>
<AppContextProvider>
<Header />
{/* two div wrappers to make page animation work and performant */}
<div id="main-content">
<div>
{/* <TransitionRoutes> */}
<Suspense>
<Routes />
</Suspense>
{/* </TransitionRoutes> */}
</div>
</div>
</AppContextProvider>
</Router>
</main>
);
};