Skip to content

Commit

Permalink
fix: guidance fetching according to locale & changed default locale i…
Browse files Browse the repository at this point in the history
…n Context
  • Loading branch information
benjaminfaure committed Nov 25, 2024
1 parent 63abbe5 commit 9ca3c25
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/WritePlan/GuidanceChoice.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function GuidanceChoice({ planId, currentOrgId, currentOrgName, isClassic }) {
})
.catch((error) => setError(error))
.finally(() => setLoading(false));
}, [planId]);
}, [planId, locale]);

const sortGuidances = (guidances) => guidances.sort((a, b) => a.name.localeCompare(b.name));

Expand Down
2 changes: 1 addition & 1 deletion src/components/context/Global.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const GlobalContext = createContext();
* @returns The GlobalContext.Provider is being returned.
*/
function Global({ children }) {
const [locale, setLocale] = useState('en');
const [locale, setLocale] = useState('fr_FR');
const [dmpId, setDmpId] = useState(null);
const [persons, setPersons] = useState([]);
// Plan Creation
Expand Down

0 comments on commit 9ca3c25

Please sign in to comment.