Server: Phase 2 (REVIEW not respected yet)
This commit is contained in:
1 parent
5d16ded553
commit
142b47674d
4271 files changed
+1203269
No files matched your search
+25
@@ -0,0 +1,25 @@
|
||||
"use client";
|
||||
import { useRouter } from "./useRouter.js";
|
||||
import { Asset } from "./Asset.js";
|
||||
import { useTags } from "./headContentUtils.js";
|
||||
import { createElement } from "react";
|
||||
import { Fragment, jsx } from "react/jsx-runtime";
|
||||
//#region src/HeadContent.tsx
|
||||
/**
|
||||
* Render route-managed head tags (title, meta, links, styles, head scripts).
|
||||
* Place inside the document head of your app shell.
|
||||
* @link https://tanstack.com/router/latest/docs/framework/react/guide/document-head-management
|
||||
*/
|
||||
function HeadContent(props) {
|
||||
const tags = useTags(props.assetCrossOrigin);
|
||||
const nonce = useRouter().options.ssr?.nonce;
|
||||
return /* @__PURE__ */ jsx(Fragment, { children: tags.map((tag) => /* @__PURE__ */ createElement(Asset, {
|
||||
...tag,
|
||||
key: `tsr-meta-${JSON.stringify(tag)}`,
|
||||
nonce
|
||||
})) });
|
||||
}
|
||||
//#endregion
|
||||
export { HeadContent };
|
||||
|
||||
//# sourceMappingURL=HeadContent.js.map
|
||||
Reference in new issue
Block a user