[Update] Plugins(VRCT Subtitles as testing one): Provide-able store and functions from main app.
This commit is contained in:
@@ -1,11 +1,19 @@
|
||||
import { initStore } from "./store/store";
|
||||
import { MainContainer } from "./main_container/MainContainer";
|
||||
import { initStore, StoreContext } from "./store/store.js";
|
||||
import { SubtitleSystemContainer } from "./subtitle_system_container/SubtitleSystemContainer";
|
||||
import { SubtitlesController } from "./subtitle_system_container/_controllers/subtitlesController.jsx";
|
||||
|
||||
export const init = (plugin_context) => {
|
||||
initStore(plugin_context.createAtomWithHook);
|
||||
const { logic_configs } = plugin_context;
|
||||
|
||||
const EntryComponents = () => {
|
||||
return <MainContainer />;
|
||||
return (
|
||||
<StoreContext.Provider value={logic_configs}>
|
||||
<SubtitlesController />
|
||||
|
||||
<SubtitleSystemContainer />
|
||||
</StoreContext.Provider>
|
||||
);
|
||||
};
|
||||
|
||||
plugin_context.registerComponent(EntryComponents);
|
||||
|
||||
Reference in New Issue
Block a user