Skip to content

Commit 20f2d3e

Browse files
committed
Update metadata.
1 parent ec5e43f commit 20f2d3e

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

src/pages/speaker/[slug].astro

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export async function getStaticPaths() {
2828
entries.map(async (entry) => {
2929
let avatar: any;
3030
if (entry.data.avatar && isUrl(entry.data.avatar)) {
31-
console.log(entry.data.avatar);
3231
try {
3332
avatar = await getCachedImage(entry.data.avatar);
3433
} catch (err) {
@@ -38,13 +37,20 @@ export async function getStaticPaths() {
3837
}
3938
return {
4039
params: { slug: entry.id },
41-
props: { entry, avatar },
40+
props: {
41+
entry: {
42+
data: {
43+
...entry.data,
44+
avatar: avatar
45+
},
46+
},
47+
}, avatar
4248
};
4349
}),
4450
);
4551
}
4652
47-
const { entry, avatar } = Astro.props;
53+
const { entry } = Astro.props;
4854
4955
const sessions = await getEntries(entry.data.submissions);
5056
@@ -99,11 +105,11 @@ function getGitHosting(url: string): string | undefined {
99105

100106
<div class="md:grid grid-cols-[460px_1fr] md:gap-6">
101107
{
102-
( avatar &&
108+
( entry.data.avatar &&
103109
<div class="flex items-start">
104110
<div class="border-4 border-white rounded-lg shadow-lg inline-block mb-10">
105111
<Image
106-
src={avatar}
112+
src={entry.data.avatar}
107113
alt={entry.data.name}
108114
height={400}
109115
width={600}

0 commit comments

Comments
 (0)