Skip to content

Commit

Permalink
Merge pull request #49 from PHS-TSA/partial-csr
Browse files Browse the repository at this point in the history
Fix Missing Partial Island Warning
  • Loading branch information
lishaduck authored May 9, 2024
2 parents 204832f + a6d9304 commit c3af851
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
6 changes: 4 additions & 2 deletions src/routes/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Head, asset } from "$fresh/runtime.ts";
import { Head, Partial, asset } from "$fresh/runtime.ts";
import type { PageProps } from "$fresh/server.ts";
import type { JSX } from "preact";
import {
Expand Down Expand Up @@ -71,7 +71,9 @@ export default function App({ Component }: PageProps): JSX.Element {
</Head>

<body f-client-nav class="dark:bg-slate-950 dark:text-slate-50">
<Component />
<Partial name="body">
<Component />
</Partial>
</body>
</html>
);
Expand Down
7 changes: 2 additions & 5 deletions src/routes/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Partial } from "$fresh/runtime.ts";
import type { PageProps } from "$fresh/server.ts";
import type { JSX } from "preact";
import { Footer } from "../components/Footer.tsx";
Expand All @@ -16,10 +15,8 @@ import { Chatbot } from "../islands/Chatbot.tsx";
export default function Layout({ Component, url }: PageProps): JSX.Element {
return (
<div class="flex min-h-screen flex-col place-content-center">
<Partial name="body">
<Header active={url.pathname} />
<Component />
</Partial>
<Header active={url.pathname} />
<Component />
<Chatbot class="fixed right-3 bottom-10 sm:right-10" />
<Footer class="mt-auto" />
</div>
Expand Down

0 comments on commit c3af851

Please sign in to comment.