mirror of
https://github.com/outline/outline.git
synced 2026-11-21 21:44:30 +03:00
18 lines
369 B
TypeScript
18 lines
369 B
TypeScript
import { useEffect } from "react";
|
|
import { useTranslation } from "react-i18next";
|
|
import { changeLanguage } from "~/utils/language";
|
|
|
|
type Props = {
|
|
locale: string;
|
|
};
|
|
|
|
export default function ChangeLanguage({ locale }: Props) {
|
|
const { i18n } = useTranslation();
|
|
|
|
useEffect(() => {
|
|
void changeLanguage(locale, i18n);
|
|
}, [locale, i18n]);
|
|
|
|
return null;
|
|
}
|