[Refactor] App.jsx: Distribute controllers to each files.

This commit is contained in:
Sakamoto Shiina
2024-12-09 10:44:34 +09:00
parent b4eacc7175
commit d7243190cb
8 changed files with 173 additions and 152 deletions

View File

@@ -0,0 +1,11 @@
import { useEffect } from "react";
import { useSelectedFontFamily } from "@logics_configs";
export const FontFamilyController = () => {
const { currentSelectedFontFamily } = useSelectedFontFamily();
useEffect(() => {
document.documentElement.style.setProperty("--font_family", currentSelectedFontFamily.data);
}, [currentSelectedFontFamily.data]);
return null;
};