fix: active links outside partials not updated (#1852)
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import { LayoutProps } from "$fresh/server.ts";
|
||||
|
||||
export default function Layout({ Component }: LayoutProps) {
|
||||
return (
|
||||
<div f-client-nav>
|
||||
<Component />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import { Partial } from "$fresh/runtime.ts";
|
||||
|
||||
export default function Page() {
|
||||
return (
|
||||
<div>
|
||||
<Partial name="content">
|
||||
<h1>/active_nav_partial/foo/bar</h1>
|
||||
</Partial>
|
||||
<p>
|
||||
<a href="/active_nav_partial/foo/bar">/active_nav_partial/foo/bar</a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="/active_nav_partial/foo">/active_nav_partial/foo</a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="/active_nav_partial">/active_nav_partial</a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="/">/</a>
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import { Partial } from "$fresh/runtime.ts";
|
||||
|
||||
export default function Page() {
|
||||
return (
|
||||
<div>
|
||||
<Partial name="content">
|
||||
<h1>/active_nav_partial/foo</h1>
|
||||
</Partial>
|
||||
<p>
|
||||
<a href="/active_nav_partial/foo/bar">/active_nav_partial/foo/bar</a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="/active_nav_partial/foo">/active_nav_partial/foo</a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="/active_nav_partial">/active_nav_partial</a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="/">/</a>
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import { Partial } from "$fresh/runtime.ts";
|
||||
|
||||
export default function Page() {
|
||||
return (
|
||||
<div>
|
||||
<Partial name="content">
|
||||
<h1>/active_nav_partial</h1>
|
||||
</Partial>
|
||||
<p>
|
||||
<a href="/active_nav_partial/foo/bar">/active_nav_partial/foo/bar</a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="/active_nav_partial/foo">/active_nav_partial/foo</a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="/active_nav_partial">/active_nav_partial</a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="/">/</a>
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import LazyLink from "../../islands/LazyLink.tsx";
|
||||
|
||||
export default function Page() {
|
||||
return (
|
||||
<div>
|
||||
<h1>active nav island</h1>
|
||||
<LazyLink
|
||||
links={[
|
||||
"/",
|
||||
"/active_nav_partial",
|
||||
"/active_nav_partial/foo",
|
||||
"/active_nav_partial/island/",
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user