Hi Team,
I am trying to get the page properties in the react framework and for doing the same I am using the below code.
Can someone please help in identifying what could have gone wrong as the same page properties is working fine with svelte framework.
export const CatchAll = () => {
const [notFound, setNotFound] = useState(false);
const [content, setContent] = useState(null);
const isPreviewingInBuilder = useIsPreviewing();
return (
<>
{!notFound ? (
<BuilderComponent
model="page"
contentLoaded={content => {
setContent(content);
if (!content && !isPreviewingInBuilder) {
setNotFound(true);
}
}}
>
<div style={{ display: 'flex', justifyContent: 'center', padding: 100 }}>
<CircularProgress color="inherit" disableShrink />
</div>
</BuilderComponent>
) : (
<NotFound /> // Your 404 content
)}
<div>{content?.data?.title}</div>
</>
);
};
Builder content link