refactor: rename useRegisterFollowCommands to command-manager and integrate into RootProviders
This commit is contained in:
@@ -13,7 +13,6 @@ import { applyAfterReadyCallbacks } from "./initialize/queue"
|
||||
import { removeAppSkeleton } from "./lib/app"
|
||||
import { appLog } from "./lib/log"
|
||||
import { Titlebar } from "./modules/app/Titlebar"
|
||||
import { useRegisterFollowCommands } from "./modules/command/use-register-follow-commands"
|
||||
import { RootProviders } from "./providers/root-providers"
|
||||
import { handlers } from "./tipc"
|
||||
|
||||
@@ -55,7 +54,6 @@ function App() {
|
||||
const AppLayer = () => {
|
||||
const appIsReady = useAppIsReady()
|
||||
|
||||
useRegisterFollowCommands()
|
||||
useEffect(() => {
|
||||
removeAppSkeleton()
|
||||
|
||||
|
||||
+5
@@ -9,3 +9,8 @@ export function useRegisterFollowCommands() {
|
||||
useRegisterEntryCommands()
|
||||
useRegisterIntegrationCommands()
|
||||
}
|
||||
|
||||
export const FollowCommandManager = () => {
|
||||
useRegisterFollowCommands()
|
||||
return null
|
||||
}
|
||||
@@ -13,6 +13,7 @@ import { HotkeysProvider } from "react-hotkeys-hook"
|
||||
import { HotKeyScopeMap } from "~/constants/hotkeys"
|
||||
import { jotaiStore } from "~/lib/jotai"
|
||||
import { persistConfig, queryClient } from "~/lib/query-client"
|
||||
import { FollowCommandManager } from "~/modules/command/command-manager"
|
||||
|
||||
import { I18nProvider } from "./i18n-provider"
|
||||
import { InvalidateQueryProvider } from "./invalidate-query-provider"
|
||||
@@ -44,7 +45,7 @@ export const RootProviders: FC<PropsWithChildren> = ({ children }) => (
|
||||
|
||||
<StableRouterProvider />
|
||||
<SettingSync />
|
||||
|
||||
<FollowCommandManager />
|
||||
{import.meta.env.DEV && <Devtools />}
|
||||
{children}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user