Skip to content

Commit

Permalink
do not destruct children on client-side
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Aug 9, 2024
1 parent 78b6231 commit 99a72b9
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions vike-solid/components/Head/Head-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,13 @@ export { Head };

// Same as ./Head-server.ts but importing useConfig-client.js

import { useConfig } from "../../hooks/useConfig/useConfig-client.js";
import type { JSX } from "solid-js/jsx-runtime";

/**
* Add arbitrary `<head>` tags.
*
* (The children are teleported to `<head>`.)
*
* https://vike.dev/Head
*/
function Head({ children }: { children: JSX.Element }): null {
const config = useConfig();
config({ Head: children });
function Head(): null {
return null;
}

0 comments on commit 99a72b9

Please sign in to comment.