Skip to content

Commit d3d6778

Browse files
author
Peer Richelsen
committed
Merge branch 'main' of github.com:calendso/calendso
2 parents 8ad6856 + 9e785c0 commit d3d6778

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

components/ui/PoweredByCalendso.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ const PoweredByCalendso = () => (
1616
</div>
1717
);
1818

19-
export default PoweredByCalendso;
19+
export default PoweredByCalendso;

lib/hooks/useLocale.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { useTranslation } from "next-i18next";
2-
import { useEffect } from "react";
32

43
type LocaleProps = {
54
localeProp: string;
@@ -8,9 +7,9 @@ type LocaleProps = {
87
export const useLocale = (props: LocaleProps) => {
98
const { i18n, t } = useTranslation("common");
109

11-
useEffect(() => {
12-
(async () => await i18n.changeLanguage(props.localeProp))();
13-
}, [i18n, props.localeProp]);
10+
if (i18n.language !== props.localeProp) {
11+
i18n.changeLanguage(props.localeProp);
12+
}
1413

1514
return {
1615
i18n,

0 commit comments

Comments
 (0)