We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa0ba32 commit a9e0b69Copy full SHA for a9e0b69
src/components/starlight/LanguageSelect.astro
@@ -22,7 +22,17 @@ import Select from "@astrojs/starlight/components/Select.astro";
22
constructor() {
23
super();
24
25
- this.querySelector('select')?.addEventListener('change', (e) => {
+ const el = this.querySelector("select");
26
+
27
+ if (!el) return;
28
29
+ const host = window.location.host;
30
+ const subdomain = host.split(".")[0];
31
+ if (subdomain === "next") {
32
+ el.value = "next";
33
+ }
34
35
+ el.addEventListener("change", (e) => {
36
const value = (e.currentTarget as HTMLSelectElement).value;
37
38
let url: URL;
0 commit comments