Add webpage component with Hero component

This commit is contained in:
itsfinniii
2026-03-20 18:07:16 +01:00
parent 423a4b74dd
commit 50dc6ec4c0
3 changed files with 77 additions and 18 deletions

View File

@@ -0,0 +1,19 @@
---
import Hero from '../web/Hero.astro';
interface Props {
webpage: WebpageComponent[];
}
const components = Astro.props.webpage;
console.log(Astro.props.webpage);
---
<div class="flex flex-col">
{ components.map((component) => (
<Fragment>
{ component.component === "Hero" && <Hero hero={component} /> }
</Fragment>
)) }
</div>