Consolidated all logic into category-specific files. Renamed useTranslation from react-i18next to useI18n to avoid a name conflict with our own function.
13 lines
403 B
JavaScript
13 lines
403 B
JavaScript
import { useEffect } from "react";
|
|
import { useAppearance } from "@logics_configs";
|
|
|
|
export const UiSizeController = () => {
|
|
const { currentUiScaling } = useAppearance();
|
|
const font_size = 62.5 * currentUiScaling.data / 100;
|
|
|
|
useEffect(() => {
|
|
document.documentElement.style.setProperty("font-size", `${font_size}%`);
|
|
}, [currentUiScaling.data]);
|
|
|
|
return null;
|
|
}; |