Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default function Categories () {
const { categories } = useRouteData()
const { CACHE_URL } = useSiteData()
return (
<h2>Categories</h2>
<div>
{(categories || []).map(cat => (
</div>
export default () => {
const props = useRouteData();
return (
<>
}>
);
};
function Screens () {
const { parentTitle, parentPath, title, screens } = useRouteData()
const hasScreens = screens && screens.length
return (
{parentTitle && <h2>{ parentTitle }</h2>}
{parentTitle && <h2> / </h2>}
{title && <h2>{ title }</h2>}
<div>
{hasScreens ? : <p>No screens found!</p>}
</div>
)
}
export default function Blog() {
const { posts } = useRouteData()
return (
<div>
<h1>It's blog time.</h1>
<div>
<a id="top" href="#bottom">
Scroll to bottom!
</a>
</div>
<br>
All Posts:
<ul>
{posts.map(post => (
<li>
{post.title}
</li>
))}</ul></div>
export default () => {
const props = useRouteData();
return (
<>
}>
);
};
export default () => {
const props = useRouteData();
return (
<>
}>
);
};
export default function Post() {
const { post } = useRouteData()
return (
<div>
{'<'} Back
<br>
<h3>{post.title}</h3>
<p>{post.body}</p>
</div>
)
}
export default function Categories () {
const { products } = useRouteData()
return (
<h2>Products</h2>
<div>
{(products || []).map(prod => (
))}
</div>
export default () => {
const props = useRouteData();
return (
<>
}>
);
};
export default () => {
const props = useRouteData();
return (
<>
}>
);
};