Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: include locale in appList query key for localization support inuseExploreAppList (#31921)

Coding On Starad3be1e4d02d
diff --git a/web/service/use-explore.ts b/web/service/use-explore.ts
index 3e3b9ff2552..a2c278f2b27 100644
--- a/web/service/use-explore.ts
+++ b/web/service/use-explore.ts
@@ -1,6 +1,7 @@
import type { App, AppCategory } from '@/models/explore'
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
import { useGlobalPublicStore } from '@/context/global-public-context'
+import { useLocale } from '@/context/i18n'
import { AccessMode } from '@/models/access-control'
import { fetchAppList, fetchBanners, fetchInstalledAppList, getAppAccessModeByAppId, uninstallApp, updatePinStatus } from './explore'
import { AppSourceType, fetchAppMeta, fetchAppParams } from './share'
@@ -13,8 +14,9 @@ type ExploreAppListData = {
}
export const useExploreAppList = () => {
+ const locale = useLocale()
return useQuery<ExploreAppListData>({
- queryKey: [NAME_SPACE, 'appList'],
+ queryKey: [NAME_SPACE, 'appList', locale],
queryFn: async () => {
const { categories, recommended_apps } = await fetchAppList()
return {