Skip to content

Commit 43c6a63

Browse files
Merge pull request #6089 from hotosm/hotfix/access-draft-private-projects
fix: unable to access draft and private projects
2 parents 216ef04 + b078afe commit 43c6a63

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

frontend/src/api/projects.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ export const useProjectsQuery = (fullProjectsQuery, action) => {
3737
};
3838

3939
export const useProjectQuery = (projectId) => {
40+
const token = useSelector((state) => state.auth.token);
41+
const locale = useSelector((state) => state.preferences['locale']);
4042
const fetchProject = ({ signal }) => {
41-
return api().get(`projects/${projectId}/`, {
43+
return api(token, locale).get(`projects/${projectId}/`, {
4244
signal,
4345
});
4446
};

0 commit comments

Comments
 (0)