diff --git a/src/components/AppRoot.tsx b/src/components/AppRoot.tsx index 328dc06..0c2726f 100644 --- a/src/components/AppRoot.tsx +++ b/src/components/AppRoot.tsx @@ -15,9 +15,14 @@ import { Bounce, ToastContainer } from 'react-toastify'; import { SettingsHome } from '~/features/settings/SettingsHome'; import { FAQ_PAGES } from '~/faq/FAQPages'; import { FaqHome } from '~/faq/FaqHome'; +import { createPlatformProvider } from '~/platform/createPlatformProvider'; +import { PlatformProviderHost } from '~/platform/PlatformContext'; +import { setPlatform } from '~/platform/platformSingleton'; // Private to this file only. const store = setupStore(); +const platform = createPlatformProvider(); +setPlatform(platform); const tabClassNames = ({ isActive }: { isActive: boolean }) => `mb-[-2px] tab ${isActive ? 'tab-active' : ''}`; @@ -27,51 +32,53 @@ export function AppRoot() { return ( -
- - - 应用 - - - - 设置 - - - - 答疑 - -
+ +
+ + + 应用 + + + + 设置 + + + + 答疑 + +
-
- - - - - {Object.entries(SETTINGS_TABS).map(([key, { Tab }]) => ( - - ))} - - - - {FAQ_PAGES.map(({ id, Component }) => ( - - ))} - - -
+
+ + + + + {Object.entries(SETTINGS_TABS).map(([key, { Tab }]) => ( + + ))} + + + + {FAQ_PAGES.map(({ id, Component }) => ( + + ))} + + +
- + -