Skip to content

Commit f44bf20

Browse files
fix(qa): use validated locale in questions fetch
1 parent f23f831 commit f44bf20

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

frontend/components/q&a/useQaTabs.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export function useQaTabs() {
101101
: '';
102102

103103
const res = await fetch(
104-
`/api/questions/${active}?page=${currentPage}&limit=10&locale=${locale}${searchParam}`
104+
`/api/questions/${active}?page=${currentPage}&limit=10&locale=${localeKey}${searchParam}`
105105
);
106106

107107
if (!res.ok) {
@@ -129,7 +129,7 @@ export function useQaTabs() {
129129
}
130130

131131
load();
132-
}, [active, currentPage, debouncedSearch, locale]);
132+
}, [active, currentPage, debouncedSearch, localeKey]);
133133

134134
const handleCategoryChange = useCallback(
135135
(category: string) => {

0 commit comments

Comments
 (0)