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 928544d commit 13be348Copy full SHA for 13be348
src/components/SearchForm/index.astro
@@ -1,10 +1,14 @@
1
---
2
-import { getCurrentLocale } from "@i18n/utils";
+import { getCurrentLocale } from "@/src/i18n/utils";
3
4
const currentLocale = getCurrentLocale(Astro.url.pathname);
5
6
7
-<form action={`/${currentLocale}/search`} method="GET" role="search">
+<form
8
+ action={`${currentLocale === "en" ? "" : `/${currentLocale}`}/search`}
9
+ method="GET"
10
+ role="search"
11
+>
12
<label for="search-term">Search</label>
13
<input
14
id="search-term"
0 commit comments