File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import React from "react" ;
22import "./App.css" ;
3- import { Head } from "@impalajs/react/head" ;
3+ import { Head , HeadProvider } from "@impalajs/react/head" ;
44
55interface AppProps {
66 title : string ;
@@ -11,12 +11,12 @@ export const App: React.FC<React.PropsWithChildren<AppProps>> = ({
1111 title,
1212} ) => {
1313 return (
14- < >
14+ < HeadProvider >
1515 < Head >
1616 < title > { title } </ title >
1717 < meta name = "description" content = "This is a demo" />
1818 </ Head >
1919 { children }
20- </ >
20+ </ HeadProvider >
2121 ) ;
2222} ;
Original file line number Diff line number Diff line change 11import "./App.css" ;
2- import { Head } from "@impalajs/preact/head" ;
2+ import { Head , HeadProvider } from "@impalajs/preact/head" ;
33
44export const App = ( { children, title } ) => {
55 return (
6- < >
6+ < HeadProvider >
77 < Head >
88 < title > { title } </ title >
99 </ Head >
1010 { children }
11- </ >
11+ </ HeadProvider >
1212 ) ;
1313} ;
Original file line number Diff line number Diff line change 11import "./App.css" ;
2- import { Head } from "@impalajs/preact/head" ;
2+ import { HeadProvider , Head } from "@impalajs/preact/head" ;
33import { FunctionComponent } from "preact" ;
44
55interface AppProps {
@@ -8,11 +8,11 @@ interface AppProps {
88
99export const App : FunctionComponent < AppProps > = ( { children, title } ) => {
1010 return (
11- < >
11+ < HeadProvider >
1212 < Head >
1313 < title > { title } </ title >
1414 </ Head >
1515 { children }
16- </ >
16+ </ HeadProvider >
1717 ) ;
1818} ;
Original file line number Diff line number Diff line change 11import React from "react" ;
22import "./App.css" ;
3- import { Head } from "@impalajs/react/head" ;
3+ import { Head , HeadProvider } from "@impalajs/react/head" ;
44
55export const App = ( { children, title } ) => {
66 return (
7- < >
7+ < HeadProvider >
88 < Head >
99 < title > { title } </ title >
1010 </ Head >
1111 { children }
12- </ >
12+ </ HeadProvider >
1313 ) ;
1414} ;
Original file line number Diff line number Diff line change 11import React from "react" ;
22import "./App.css" ;
3- import { Head } from "@impalajs/react/head" ;
3+ import { Head , HeadProvider } from "@impalajs/react/head" ;
44
55interface AppProps {
66 title : string ;
@@ -11,11 +11,11 @@ export const App: React.FC<React.PropsWithChildren<AppProps>> = ({
1111 title,
1212} ) => {
1313 return (
14- < >
14+ < HeadProvider >
1515 < Head >
1616 < title > { title } </ title >
1717 </ Head >
1818 { children }
19- </ >
19+ </ HeadProvider >
2020 ) ;
2121} ;
You can’t perform that action at this time.
0 commit comments