mirror of
https://github.com/hexastack/hexabot
synced 2025-02-23 12:59:14 +00:00
fix: refactor
This commit is contained in:
parent
77ac209bf8
commit
3f8f0cfc8c
@ -6,7 +6,6 @@
|
|||||||
* 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file).
|
* 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
import { Avatar, Box } from "@mui/material";
|
import { Avatar, Box } from "@mui/material";
|
||||||
import UiChatWidget from "hexabot-chat-widget/src/UiChatWidget";
|
import UiChatWidget from "hexabot-chat-widget/src/UiChatWidget";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
@ -25,8 +24,7 @@ import { ChatWidgetHeader } from "./ChatWidgetHeader";
|
|||||||
const SETTING_TYPE = "console_channel" as const;
|
const SETTING_TYPE = "console_channel" as const;
|
||||||
|
|
||||||
export const ChatWidget = () => {
|
export const ChatWidget = () => {
|
||||||
const router = useRouter();
|
const { pathname } = useRouter();
|
||||||
const pathname = router.pathname;
|
|
||||||
const { apiUrl } = useConfig();
|
const { apiUrl } = useConfig();
|
||||||
const { isAuthenticated } = useAuth();
|
const { isAuthenticated } = useAuth();
|
||||||
const isVisualEditor = pathname.startsWith(`/${RouterType.VISUAL_EDITOR}`);
|
const isVisualEditor = pathname.startsWith(`/${RouterType.VISUAL_EDITOR}`);
|
||||||
|
Loading…
Reference in New Issue
Block a user