Translate: Only add button in chat box

This commit is contained in:
V
2023-05-11 02:34:25 +02:00
parent 4d0a064425
commit 6e3cafce42
2 changed files with 10 additions and 3 deletions

View File

@ -37,9 +37,12 @@ export function TranslateIcon({ height = 24, width = 24, className }: { height?:
);
}
export function TranslateChatBarIcon() {
export function TranslateChatBarIcon({ slateProps }: { slateProps: { type: { analyticsName: string; }; }; }) {
const { autoTranslate } = settings.use(["autoTranslate"]);
if (slateProps.type.analyticsName !== "normal")
return null;
return (
<Tooltip text="Open Translate Modal">
{({ onMouseEnter, onMouseLeave }) => (