import { Provider, useStore } from "jotai"; import { type FC, useEffect, useState } from "react"; import { createRoot } from "react-dom/client"; import { PrebuiltLyricPlayer } from "@react-full/components/PrebuiltLyricPlayer"; import { HorizontalLayout } from "@react-full/layout/horizontal"; import { VerticalLayout } from "@react-full/layout/vertical"; import { hideLyricViewAtom } from "@react-full/states/configAtoms"; import { musicLyricLinesAtom } from "@react-full/states/dataAtoms"; const App: FC = () => { const [hideLyric, setHideLyric] = useState(false); const store = useStore(); useEffect(() => { store.set(musicLyricLinesAtom, [ { words: [ { word: "Test", startTime: 0, endTime: 1000, romanWord: "", }, ], startTime: 0, endTime: 1000, translatedLyric: "", romanLyric: "", isBG: false, isDuet: false, }, ]); }, [store]); useEffect(() => { store.set(hideLyricViewAtom, hideLyric); }, [hideLyric, store]); return ( <>