Skip to content

Commit b287c9b

Browse files
committed
fix: use Vite imports for assets to resolve subpath URLs
1 parent 44984ed commit b287c9b

5 files changed

Lines changed: 16 additions & 2 deletions

File tree

src/components/Architecture.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { useFadeIn } from '../hooks/useFadeIn'
2+
import architectureSvg from '../assets/architecture.svg'
23

34
export default function Architecture() {
45
const ref = useFadeIn()
@@ -19,7 +20,7 @@ export default function Architecture() {
1920
{/* Architecture diagram */}
2021
<div className="rounded-xl border border-navy-700/50 overflow-hidden bg-navy-900/50">
2122
<img
22-
src="/architecture.svg"
23+
src={architectureSvg}
2324
alt="AgentAnycast sidecar architecture showing App → SDK → gRPC → Go daemon → libp2p → Remote Peer"
2425
className="w-full"
2526
/>

src/components/Logo.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
import logoDark from '../assets/logo-dark.png'
2+
13
export default function Logo({ size = 32 }: { size?: number }) {
24
return (
35
<img
4-
src="/logo-dark.png"
6+
src={logoDark}
57
alt="AgentAnycast"
68
width={size}
79
height={size}

src/vite-env.d.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/// <reference types="vite/client" />
2+
3+
declare module '*.png' {
4+
const src: string
5+
export default src
6+
}
7+
8+
declare module '*.svg' {
9+
const src: string
10+
export default src
11+
}

0 commit comments

Comments
 (0)