fix(frontend): update widget visibility condition

This commit is contained in:
yassinedorbozgithub 2024-12-10 10:30:37 +01:00
parent db710365d3
commit 809223204a

View File

@ -27,7 +27,7 @@ export const ChatWidget = () => {
const pathname = usePathname(); const pathname = usePathname();
const { apiUrl } = useConfig(); const { apiUrl } = useConfig();
const { isAuthenticated } = useAuth(); const { isAuthenticated } = useAuth();
const isVisualEditor = pathname === `/${RouterType.VISUAL_EDITOR}`; const isVisualEditor = pathname.startsWith(`/${RouterType.VISUAL_EDITOR}`);
const allowedDomainsSetting = useSetting(SETTING_TYPE, "allowed_domains"); const allowedDomainsSetting = useSetting(SETTING_TYPE, "allowed_domains");
const themeColorSetting = useSetting(SETTING_TYPE, "theme_color"); const themeColorSetting = useSetting(SETTING_TYPE, "theme_color");
const [key, setKey] = useState(generateId()); const [key, setKey] = useState(generateId());