Add webpage component with Hero component
This commit is contained in:
19
astro/src/components/webpage/Webpage.astro
Normal file
19
astro/src/components/webpage/Webpage.astro
Normal 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>
|
||||
Reference in New Issue
Block a user