Skip to content

Commit

Permalink
Fix bg url in release mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmacdonald committed Feb 22, 2025
1 parent f23c4b9 commit 9e62a4c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions frontend/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func AddRoutes(engine *gin.Engine, _ string) error {
indexData, errIndex := embedFS.ReadFile("dist/index.html")
if errIndex != nil {
slog.Error("Failed to read index.html")

return errors.Join(errIndex, ErrContentRoot)
}

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/BackgroundImageProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function getImageUrl(name: string | number) {
if (import.meta.env.MODE === 'development') {
return `/public/bg/${name}.png`;
} else {
return `/bg/${name}`;
return `/bg/${name}.png`;
}
}

Expand Down

0 comments on commit 9e62a4c

Please sign in to comment.