Skip to content

Commit 48d0a60

Browse files
committed
fix: use astro:assets Image
1 parent 6725bc6 commit 48d0a60

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Diff for: src/components/Header.astro

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
interface Props {}
33
44
import { getLangFromUrl, useTranslations } from '../i18n/utils';
5+
import { Image } from 'astro:assets';
6+
import aux from '../../public/aux.svg';
57
68
const lang = getLangFromUrl(Astro.url);
79
const translation = useTranslations(lang);
@@ -10,7 +12,7 @@ const translation = useTranslations(lang);
1012
<header>
1113
<div class="left">
1214
<a href="https://aux.computer" class="brand">
13-
<img class="icon" src="/aux.svg" />
15+
<Image class="icon" src={aux} alt="aux.computer logo" />
1416
<span class="title">aux.computer</span>
1517
</a>
1618
</div>

Diff for: src/components/Hero.astro

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
import { getLangFromUrl, useTranslations } from '../i18n/utils';
3+
import { Image } from 'astro:assets';
4+
import aux from '../../public/aux.svg';
35
46
const lang = getLangFromUrl(Astro.url);
57
const translation = useTranslations(lang);
@@ -8,7 +10,7 @@ const translation = useTranslations(lang);
810
<div class="hero">
911
<div class="content">
1012
<div class="icon">
11-
<img src="/aux.svg" alt="" />
13+
<Image src={aux} alt="aux.computer logo" />
1214
</div>
1315
<h1 class="title">aux.computer</h1>
1416
<div class="description">{translation("root.description")}</div>

0 commit comments

Comments
 (0)