重构应用程序架构,添加 OpenIM SDK 初始化和引导逻辑
This commit is contained in:
11
features/im/hooks/use-openim-bootstrap.ts
Normal file
11
features/im/hooks/use-openim-bootstrap.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { useEffect } from "react";
|
||||
|
||||
import { bootstrapOpenIM } from "@/features/im/openim-bootstrap";
|
||||
|
||||
export function useOpenIMBootstrap() {
|
||||
useEffect(() => {
|
||||
bootstrapOpenIM().catch((error) => {
|
||||
console.error("OpenIM bootstrap failed", error);
|
||||
});
|
||||
}, []);
|
||||
}
|
||||
Reference in New Issue
Block a user