Skip to content

Commit

Permalink
fix: fix default language loading
Browse files Browse the repository at this point in the history
  • Loading branch information
milad-emami committed Jul 16, 2023
1 parent 3242c01 commit 58ed08c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/home-page/home/HomePagePartners.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const HomePagePartners = () => {
{PopularPartners?.map((partner) => (
<Link
to={`/partners/${partner?.organization.short_name}`}
className="mr-4 partners-img-wrapper"
className="partners-img-wrapper"
key={partner?.organization.id}
>
<img
Expand Down
5 changes: 3 additions & 2 deletions src/hooks/utils/useManageLocale.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const useManageLocale = () => {
const [isLoading, setIsLoading] = useState(true);

useEffect(() => {
if (activeLangs && !error) {
if (activeLangs) {
const currentLocale = getLocale();
const newLocale = activeLangs[0]?.code;
const url = new URL(getConfig().LMS_BASE_URL).hostname;
Expand All @@ -23,7 +23,8 @@ const useManageLocale = () => {
} else {
setIsLoading(false);
}
} else {
}
if (error) {
setIsLoading(false);
}
}, [activeLangs, error]);
Expand Down

0 comments on commit 58ed08c

Please sign in to comment.