File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
custom-implementation/src Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change
1
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2
+ export const ThemeSwitch = ( { sibling } : any ) => {
3
+ return < > { sibling } hello</ >
4
+ }
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import React from 'react'
7
7
8
8
import Header from './components/header'
9
9
import Footer from './components/footer'
10
+ import { ThemeSwitch } from './components/theme-switch'
10
11
11
12
import { getPageData } from './modules/sanity/utils'
12
13
@@ -16,6 +17,8 @@ const render = async () => {
16
17
*/
17
18
18
19
const data = await getPageData ( )
20
+ const sidenav = // eslint-disable-next-line @typescript-eslint/no-explicit-any
21
+ document . querySelector ( 'button.fern-search-bar' ) ?. parentElement as any
19
22
20
23
ReactDOM . render (
21
24
React . createElement ( Header , { ...data . header } ) ,
@@ -35,6 +38,9 @@ const render = async () => {
35
38
if ( footer ) footer . style . display = 'block'
36
39
} ,
37
40
)
41
+
42
+ // console.log('sidenav', sidenav)
43
+ ReactDOM . render ( React . createElement ( ThemeSwitch ) , sidenav )
38
44
}
39
45
40
46
let observations = 0
You can’t perform that action at this time.
0 commit comments