Skip to content

Commit

Permalink
fix: 更新主页 URL 和图片资源引用
Browse files Browse the repository at this point in the history
  • Loading branch information
Shua-github committed Dec 29, 2024
1 parent e3f5aa1 commit 3a3a824
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@
"last 1 safari version"
]
},
"homepage": "https://shua-github.github.io/"
"homepage": "https://shua-github.github.io/arcaea-stickers-zh"
}
2 changes: 1 addition & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function App() {
setLoaded(false);
}, [character]);

img.src = "/arcaea-stickers-zh/static/img/" + characters[character].img;
img.src = `${process.env.PUBLIC_URL}/static/img/` + characters[character].img;

img.onload = () => {
setLoaded(true);
Expand Down
4 changes: 2 additions & 2 deletions src/components/Picker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ export default function Picker({ setCharacter }) {
}}
>
<img
src={`/arcaea-stickers-zh/static/img/${c.img}`}
srcSet={`/arcaea-stickers-zh/static/img/${c.img}`}
src={`${process.env.PUBLIC_URL}/static/img/${c.img}`}
srcSet={`${process.env.PUBLIC_URL}/static/img/${c.img}`}
alt={c.name}
loading="lazy"
/>
Expand Down

0 comments on commit 3a3a824

Please sign in to comment.