Skip to content

Commit

Permalink
Pass the lang in versions block
Browse files Browse the repository at this point in the history
Signed-off-by: Damian Stasik <[email protected]>
  • Loading branch information
damianstasik committed Aug 29, 2024
1 parent d39e9b4 commit 195bcb0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useSuspenseQuery } from "@tanstack/react-query";
import { useProviderParams } from "../hooks/useProviderParams";

export function ProviderVersionsSidebarBlock() {
const { namespace, provider, version, type, doc } = useProviderParams();
const { namespace, provider, version, type, doc, lang } = useProviderParams();

const { data } = useSuspenseQuery(getProviderDataQuery(namespace, provider));

Expand All @@ -16,7 +16,7 @@ export function ProviderVersionsSidebarBlock() {
latestVersion={data.versions[0]}
currentVersion={version || data.versions[0].id}
versionLink={(version) =>
`/provider/${namespace}/${provider}/${version}${type && doc ? `/docs/${type}/${doc}` : ""}`
`/provider/${namespace}/${provider}/${version}${type && doc ? `/docs/${type}/${doc}` : ""}${lang ? `?lang=${lang}` : ""}`
}
/>
);
Expand Down

0 comments on commit 195bcb0

Please sign in to comment.