Skip to content

Commit

Permalink
fix: syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
robsongajunior committed Oct 18, 2023
1 parent 00f3124 commit 26bece5
Showing 1 changed file with 31 additions and 38 deletions.
69 changes: 31 additions & 38 deletions 2023/_buildwithastro/src/components/Speakers.astro
Original file line number Diff line number Diff line change
@@ -1,49 +1,42 @@
---
interface Props {
speakers: [{
name: String,
img: String,
user: String,
link: String,
bio: String
}]
speakers: [
{
name: String;
img: String;
user: String;
link: String;
bio: String;
},
];
}
const { speakers } = Astro.props;
---

<section class="section section-speakers" id="speakers">
<div class="wrapper">
<h2 class="section-title section-title-highlight">Palestrantes</h2>
<div class="wrapper">
<h2 class="section-title section-title-highlight">Palestrantes</h2>

<ul class="speakers-list">
{speakers.map((data) => <li class="speaker-item">
<div class="speaker-photo-container">
<img
lazy
class="speaker-photo"
src={data.img}
alt={data.name}
/>
</div>
<div class="speaker-info">
<h3 class="speaker-name">
{data.name}
</h3>
<a
href={data.link}
class="speaker-twitter"
target="_blank">
{data.user}
</a>
<p class="speaker-bio">
{data.bio}
</p>
</div>
</li>
)}
</ul>
</div>
<ul class="speakers-list">
{
speakers.map((data) => (
<li class="speaker-item">
<div class="speaker-photo-container">
<img lazy class="speaker-photo" src={data.img} alt={data.name} />
</div>
<div class="speaker-info">
<h3 class="speaker-name">{data.name}</h3>
<a href={data.link} class="speaker-twitter" target="_blank">
{data.user}
</a>
<p class="speaker-bio">{data.bio}</p>
</div>
</li>
))
}
</ul>
</div>
</section>
<style lang="scss">
@import "../styles/helpers";
Expand All @@ -52,4 +45,4 @@ const { speakers } = Astro.props;
@import "../styles/core/layout";
@import "../styles/partials/_sections.scss";
@import "../styles/partials/_section_speakers.scss";
</style>
</style>

0 comments on commit 26bece5

Please sign in to comment.