Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
render() {
let pageData = DataStore.getPageBySlug('contact');
return (
<div>
<h2>Contact page template</h2>
<h1>{pageData.title.rendered}</h1>
<div>
<div>{pageData.acf.text}</div>
</div>
);
}
}</div>
render() {
let pageData = DataStore.getPageBySlug('home');
return (
<div>
<h2>Homepage template</h2>
<h1>{pageData.title.rendered}</h1>
<div>
<div>{pageData.acf.text}</div>
</div>
);
}
}</div>