File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed
docs/components/pages/landing/hero Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -29,12 +29,12 @@ const DemoEditor = dynamic(
29
29
} ,
30
30
) ;
31
31
32
- export function Demo ( props : { theme : "light" | "dark" } ) {
32
+ export function Demo ( props : { theme ? : "light" | "dark" } ) {
33
33
return (
34
34
< div className = "hero relative h-[36rem] w-full shrink-0 grow-0 rounded-lg xl:w-[584px]" >
35
35
< div className = "editor-glow absolute z-10 h-full w-full" />
36
36
< div className = "relative z-20 h-full w-full rounded-lg bg-white dark:bg-[#202020]" >
37
- < DemoEditor theme = { props . theme === "dark" ? "dark" : "light" } />
37
+ < DemoEditor theme = { props . theme } />
38
38
</ div >
39
39
< TryHereImage />
40
40
</ div >
Original file line number Diff line number Diff line change @@ -54,9 +54,8 @@ function getUTCDateYYYYMMDD() {
54
54
return `${ year } ${ formattedMonth } ${ formattedDay } ` ;
55
55
}
56
56
57
- export default function DemoEditor ( props : { theme : "light" | "dark" } ) {
57
+ export default function DemoEditor ( props : { theme ? : "light" | "dark" } ) {
58
58
const [ doc , provider ] = useMemo ( ( ) => {
59
- console . log ( "create" ) ;
60
59
const doc = new Y . Doc ( ) ;
61
60
const provider = new YPartyKitProvider (
62
61
"blocknote.yousefed.partykit.dev" ,
Original file line number Diff line number Diff line change @@ -15,7 +15,13 @@ export function Hero() {
15
15
"z-20 flex w-full flex-col items-center justify-between gap-6 px-6 md:max-w-screen-md xl:max-w-[1440px] xl:flex-row"
16
16
} >
17
17
< Text />
18
- < Demo theme = { theme === "dark" ? "dark" : "light" } />
18
+ < Demo
19
+ theme = {
20
+ theme === undefined || theme === "system"
21
+ ? undefined
22
+ : ( theme as "light" | "dark" | undefined )
23
+ }
24
+ />
19
25
</ FadeIn >
20
26
</ Section >
21
27
) ;
You can’t perform that action at this time.
0 commit comments