feat: 🚸 use fresh partial to add spa like navigation

This commit is contained in:
Julien Oculi 2024-02-13 14:04:10 +01:00
parent fd32f4c59d
commit 315fc1564d

View file

@ -1,4 +1,4 @@
import { asset, Head } from '$fresh/runtime.ts'
import { asset, Head, Partial } from '$fresh/runtime.ts'
import { type PageProps } from '$fresh/server.ts'
import { Footer } from '../components/Footer.tsx'
import { Header } from '../components/Header.tsx'
@ -31,8 +31,10 @@ export default function App({ Component }: PageProps) {
</Head>
<body>
<Header />
<main>
<Component />
<main f-client-nav>
<Partial name='main'>
<Component />
</Partial>
</main>
<Footer />
</body>