Skip to content

Commit 55b50f2

Browse files
Fixed homepage links not resolving when DOMAIN_SUB_PATH is set. Fixes #96
1 parent c061136 commit 55b50f2

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
### Fixed
1111

1212
- Fixed issue where incorrect repository icons were shown occasionally in the filter panel. ([#95](https://github.com/sourcebot-dev/sourcebot/issues/95))
13+
- Fixed homepage links not resolving correctly when DOMAIN_SUB_PATH is set. ([#96](https://github.com/sourcebot-dev/sourcebot/issues/96))
1314

1415
## [2.5.1] - 2024-11-26
1516

packages/web/src/app/page.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { SearchBar } from "./components/searchBar";
1010
import { Separator } from "@/components/ui/separator";
1111
import { SymbolIcon } from "@radix-ui/react-icons";
1212
import { UpgradeToast } from "./components/upgradeToast";
13+
import Link from "next/link";
1314

1415

1516
export default async function Home() {
@@ -123,12 +124,12 @@ const RepositoryList = async () => {
123124
<div className="flex flex-col items-center gap-3">
124125
<span className="text-sm">
125126
{`Search ${repos.length} `}
126-
<a
127+
<Link
127128
href="/repos"
128129
className="text-blue-500"
129130
>
130131
{repos.length > 1 ? 'repositories' : 'repository'}
131-
</a>
132+
</Link>
132133
</span>
133134
<RepositoryCarousel repos={repos} />
134135
</div>
@@ -171,11 +172,11 @@ const QueryExplanation = ({ children }: { children: React.ReactNode }) => {
171172

172173
const Query = ({ query, children }: { query: string, children: React.ReactNode }) => {
173174
return (
174-
<a
175+
<Link
175176
href={`/search?query=${query}`}
176177
className="cursor-pointer hover:underline"
177178
>
178179
{children}
179-
</a>
180+
</Link>
180181
)
181182
}

0 commit comments

Comments
 (0)