Skip to content
Snippets Groups Projects
Commit 0a582c98 authored by victor mutai's avatar victor mutai
Browse files

chore: disable icon if ai is disabled

......@@ -3,7 +3,7 @@ import { WaxContext, MenuButton } from 'wax-prosemirror-core';
import PropTypes from 'prop-types';
const ToggleAiComponent = ({ item }) => {
const { app, pmViews } = useContext(WaxContext);
const { app, pmViews, options } = useContext(WaxContext);
const enableService = app.config.get('config.AskAiContentService');
let isDisabled = false;
......@@ -19,7 +19,7 @@ const ToggleAiComponent = ({ item }) => {
enableService.AiOn ? (
<MenuButton
active={false}
disabled={!isEditable}
disabled={!isEditable || !options?.AiOn}
iconName={item.icon}
title={item.title}
/>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment