mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-01 00:42:49 +08:00
Fix logo not loading under a non-root base path
The logo <img> used a hardcoded absolute "/logo.png" path, which only resolves correctly when the app is served from the domain root. Under the GitHub Pages demo (served from /webspeak3/), this 404'd. Vite already rewrites asset references in index.html for the configured base path, but plain string literals in JSX aren't touched, so this needs import.meta.env.BASE_URL explicitly. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
fe1b5ff991
commit
65813b6367
1 file changed
+1
-1
+1
-1
@@ -2391,7 +2391,7 @@ function AppInner() {
|
||||
>
|
||||
{theme === "dark" ? "☀️" : "🌙"}
|
||||
</button>
|
||||
<img src="/logo.png" alt="" className="ts-app-logo" />
|
||||
<img src={`${import.meta.env.BASE_URL}logo.png`} alt="" className="ts-app-logo" />
|
||||
<span className="ts-app-title">WebSpeak3</span>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in new issue
Block a user