feat: de-duplicate <Head> children by key (#1793)

This commit is contained in:
Marvin Hagemeister
2023-09-18 22:06:56 +02:00
committed by GitHub
parent 58b2bd9e7f
commit 567df19f3d
7 changed files with 255 additions and 112 deletions
+19
View File
@@ -0,0 +1,19 @@
import { Head } from "$fresh/runtime.ts";
export default function Page() {
return (
<>
<h1>Card head css deduplication</h1>
<Head>
<title>foo</title>
<link rel="stylesheet" href="/card.css" key="card.css" />
<meta property="og:title" content="My page title" key="title" />
</Head>
<Head>
<title>bar</title>
<link rel="stylesheet" href="/card.css" key="card.css" />
<meta property="og:title" content="Other title" key="title" />
</Head>
</>
);
}