mirror of
https://github.com/outline/outline.git
synced 2025-12-20 10:09:43 -06:00
18 lines
372 B
TypeScript
18 lines
372 B
TypeScript
import * as React 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();
|
|
|
|
React.useEffect(() => {
|
|
void changeLanguage(locale, i18n);
|
|
}, [locale, i18n]);
|
|
|
|
return null;
|
|
}
|