@tanstack/solid-router
Version:
Modern and scalable routing for Solid applications
1 lines • 1.26 kB
Source Map (JSON)
{"version":3,"file":"HeadContent.cjs","names":["MetaProvider","For","Asset","useTags","HeadContent","tags","_$createComponent","children","each","tag"],"sources":["../../src/HeadContent.tsx"],"sourcesContent":["import { MetaProvider } from '@solidjs/meta'\nimport { For } from 'solid-js'\nimport { Asset } from './Asset'\nimport { useTags } from './headContentUtils'\n\n/**\n * @description The `HeadContent` component is used to render meta tags, links, and scripts for the current route.\n * When using full document hydration (hydrating from `<html>`), this component should be rendered in the `<body>`\n * to ensure it's part of the reactive tree and updates correctly during client-side navigation.\n * The component uses portals internally to render content into the `<head>` element.\n */\nexport function HeadContent() {\n const tags = useTags()\n\n return (\n <MetaProvider>\n <For each={tags()}>{(tag) => <Asset {...tag} />}</For>\n </MetaProvider>\n )\n}\n"],"mappings":";;;;;;;;;;;;;AAWA,SAAgBI,cAAc;CAC5B,MAAMC,OAAOF,yBAAAA,SAAS;AAEtB,SAAA,GAAA,aAAA,iBACGH,cAAAA,cAAY,EAAA,IAAAO,WAAA;AAAA,UAAA,GAAA,aAAA,iBACVN,SAAAA,KAAG;GAAA,IAACO,OAAI;AAAA,WAAEH,MAAM;;GAAAE,WAAIE,SAAAA,GAAAA,aAAAA,iBAASP,cAAAA,OAAUO,IAAG;GAAI,CAAA;IAAA,CAAA"}