|
|
@@ -2,6 +2,7 @@ import type { JSX } from 'react';
|
|
|
|
|
|
import dynamic from 'next/dynamic';
|
|
|
|
|
|
+import { useIsAiEnabled } from '~/stores-universal/context';
|
|
|
import { useDrawerOpened } from '~/stores/ui';
|
|
|
|
|
|
import { EditorAssistantToggleButton } from './EditorAssistantToggleButton';
|
|
|
@@ -15,6 +16,7 @@ const SavePageControls = dynamic(() => import('./SavePageControls').then(mod =>
|
|
|
const OptionsSelector = dynamic(() => import('./OptionsSelector').then(mod => mod.OptionsSelector), { ssr: false });
|
|
|
|
|
|
export const EditorNavbarBottom = (): JSX.Element => {
|
|
|
+ const { data: isAiEnabled } = useIsAiEnabled();
|
|
|
const { mutate: mutateDrawerOpened } = useDrawerOpened();
|
|
|
|
|
|
return (
|
|
|
@@ -29,7 +31,9 @@ export const EditorNavbarBottom = (): JSX.Element => {
|
|
|
</a>
|
|
|
<form className="me-auto d-flex gap-2">
|
|
|
<OptionsSelector />
|
|
|
- <EditorAssistantToggleButton />
|
|
|
+ {isAiEnabled && (
|
|
|
+ <EditorAssistantToggleButton />
|
|
|
+ )}
|
|
|
</form>
|
|
|
<form>
|
|
|
<SavePageControls />
|