@@ -4,7 +4,7 @@ import MDXContent from "@theme-original/MDXContent";
44import TracingBeam from "@site/src/components/tracing-beam" ;
55import svgToDataUri from "mini-svg-data-uri" ;
66import { BackgroundGradientAnimation } from "@site/src/components/background-gradient-animation" ;
7- import { useHistory } from "@docusaurus/router" ;
7+
88
99export default function MDXContentWrapper ( props ) {
1010 let image = `url("${ svgToDataUri (
@@ -17,9 +17,11 @@ export default function MDXContentWrapper(props) {
1717 history . push ( "/docs/another-page" ) ;
1818 } ;
1919
20+ console . log ( "bloggging" , props ?. children ?. type ?. metadata )
21+
2022 return (
2123 < >
22- { props ?. children ?. type ?. metadata ?. title ? (
24+ { props ?. children ?. type ?. metadata ?. source . includes ( "@site/blog" ) ? (
2325 < >
2426 < BackgroundGradientAnimation
2527 lightImage = { props ?. children ?. type ?. frontMatter ?. light_image }
@@ -43,13 +45,13 @@ export default function MDXContentWrapper(props) {
4345 >
4446 < h1 style = { { color : props ?. children ?. type ?. frontMatter ?. text_color } } >
4547 < a style = { { color : props ?. children ?. type ?. frontMatter ?. text_color } } href = { props . children . type . metadata . permalink } >
46- { props . children . type . metadata . title }
48+ { props . children . type . metadata . title || "yo" }
4749 </ a >
4850 </ h1 >
4951 < h3
5052 style = { { paddingLeft : "1vw" , fontSize : "16px" , fontWeight : 400 , color : props ?. children ?. type ?. frontMatter ?. text_color } }
5153 >
52- { props . children . type . metadata . authors . length > 0 &&
54+ { props ? .children ? .type ? .metadata ? .authors ? .length > 0 &&
5355 props . children . type . metadata . authors . map ( ( item , index ) => (
5456 < span style = { { color : props ?. children ?. type ?. frontMatter ?. text_color } } key = { index } > { " " + item . name + "," } </ span >
5557 ) ) }
@@ -58,7 +60,7 @@ export default function MDXContentWrapper(props) {
5860 < span style = { { color : props ?. children ?. type ?. frontMatter ?. text_color } } > { Math . ceil ( props . children . type . metadata . readingTime * 10 ) / 1 } min</ span >
5961 </ h3 >
6062 < div className = "flex flex-row items-center mb-10 w-full" >
61- { props . children . type . metadata . authors . map ( ( item , index ) => (
63+ { props ? .children ? .type ? .metadata . authors ? .map ( ( item , index ) => (
6264 < div className = "pl-2" >
6365 < img
6466 className = "author-avatar"
@@ -68,7 +70,7 @@ export default function MDXContentWrapper(props) {
6870 </ div >
6971 ) ) }
7072 < div className = "pl-6" >
71- { props . children . type . metadata . authors . length > 0 &&
73+ { props ? .children ? .type ? .metadata ? .authors ? .length > 0 &&
7274 props . children . type . metadata . authors . map ( ( item , index ) => (
7375 < span style = { { color : props ?. children ?. type ?. frontMatter ?. text_color } } key = { index } >
7476 { " " + item . name + ( index < props . children . type . metadata . authors . length - 1 ? "," : "" ) }
@@ -77,15 +79,17 @@ export default function MDXContentWrapper(props) {
7779 </ div >
7880 </ div >
7981 </ BackgroundGradientAnimation >
80- < MDXContent style = { { backgroundImage : image } } { ...props } />
82+ < div className = "dev-docs-blog" >
83+ < MDXContent style = { { backgroundImage : image } } { ...props } />
84+ </ div >
8185 </ >
8286 ) : (
8387 < TracingBeam >
84- < div >
88+ < div id = "tracing-beam" >
8589 < MDXContent style = { { backgroundImage : image } } { ...props } />
8690 </ div >
8791 </ TracingBeam >
8892 ) }
8993 </ >
9094 ) ;
91- }
95+ }
0 commit comments