Skip to content

Commit ec8097f

Browse files
authored
Fix fetching releases in prod deployment (#1459)
All other deployments run on root, but for prod we run under /docs, which was missing for the path.
1 parent 3e0eff2 commit ec8097f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/components/ReleasesTable.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ export function SupportedReleasesTable() {
6262
const [error, setError] = useState<string | null>(null);
6363

6464
useEffect(() => {
65-
fetch('/api/releases')
65+
const basePath = process.env.NEXT_PUBLIC_DOCS_BASE_PATH || '';
66+
fetch(`${basePath}/api/releases`)
6667
.then(res => {
6768
if (!res.ok) throw new Error('Failed to fetch releases');
6869
return res.json();
@@ -132,7 +133,9 @@ export function SupportedReleasesTable() {
132133
<td className="px-4 py-2"></td>
133134
<td className="px-4 py-2">
134135
<a
135-
href={`/technical-changelog#v${getChangelogAnchor(release.version)}`}
136+
href={`/technical-changelog#v${getChangelogAnchor(
137+
release.version
138+
)}`}
136139
className="text-blue-600 hover:underline dark:text-blue-400"
137140
>
138141
Notes

0 commit comments

Comments
 (0)