diff --git a/src/components/ProjectLogo.astro b/src/components/ProjectLogo.astro
index 307ca05..98ba486 100644
--- a/src/components/ProjectLogo.astro
+++ b/src/components/ProjectLogo.astro
@@ -1,23 +1,25 @@
---
+import {Icon} from 'astro-icon/components';
import {type ProjectEntry} from '@data/types';
interface Props {
- id: ProjectEntry['logo'];
+ logo: ProjectEntry['logo'];
name?: ProjectEntry['name'];
url?: ProjectEntry['url'];
}
-const {id, name = '', url = ''} = Astro.props;
-const logos = await Astro.glob('../assets/svg/Logo*.astro');
-
-function getLogo(logoId: string) {
- const foundLogo = logos.find(({file}) => file.includes(logoId));
- // TODO: Pass back a unique fallback logo?
- return foundLogo ? foundLogo.default : logos[0].default;
-}
-
-const LogoSvg = getLogo(id);
+// No need to strongly type `logo`, because `astro-icon` will fail the
+// build if it cannot find the SVG asset.
+const {logo, name = '', url = ''} = Astro.props;
const isLink = Boolean(url && name);
+
+const iconProps = {
+ name: `logos/${logo}`,
+ // `astro-icon` appends a `width/height` prop, which we do not want.
+ // There should be a way to do this via SVGO.
+ width: undefined,
+ height: undefined,
+};
---
{
@@ -30,12 +32,12 @@ const isLink = Boolean(url && name);
rel="noopener noreferrer"
data-overlay-action
>
-