From a61d4d99cfa7d043b4ffbf5d7207dc8f4781f47f Mon Sep 17 00:00:00 2001 From: royallsilwallz Date: Thu, 18 Apr 2024 09:59:20 +0545 Subject: [PATCH] Fix Project Instructions not picking up user opted language issue - Related to #6338 --- frontend/src/api/projects.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/api/projects.js b/frontend/src/api/projects.js index 663ca61fda..cc37c35748 100644 --- a/frontend/src/api/projects.js +++ b/frontend/src/api/projects.js @@ -53,8 +53,11 @@ export const useProjectQuery = (projectId) => { }); }; export const useProjectSummaryQuery = (projectId, otherOptions = {}) => { + const token = useSelector((state) => state.auth.token); + const locale = useSelector((state) => state.preferences['locale']); + const fetchProjectSummary = ({ signal }) => { - return api().get(`projects/${projectId}/queries/summary/`, { + return api(token, locale).get(`projects/${projectId}/queries/summary/`, { signal, }); };