aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/translate/TranslateIcon.tsx
diff options
context:
space:
mode:
authorV <vendicated@riseup.net>2023-05-11 02:34:25 +0200
committerV <vendicated@riseup.net>2023-05-11 02:35:06 +0200
commit6e3cafce42ea4eee7e1103225ebe5cb9931967e1 (patch)
tree6fc847562b2d246749fffdf90dc94dc9dd561ade /src/plugins/translate/TranslateIcon.tsx
parent4d0a0644254294371831be0fe342aa824cc717ff (diff)
downloadVencord-6e3cafce42ea4eee7e1103225ebe5cb9931967e1.tar.gz
Vencord-6e3cafce42ea4eee7e1103225ebe5cb9931967e1.tar.bz2
Vencord-6e3cafce42ea4eee7e1103225ebe5cb9931967e1.zip
Translate: Only add button in chat box
Diffstat (limited to 'src/plugins/translate/TranslateIcon.tsx')
-rw-r--r--src/plugins/translate/TranslateIcon.tsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/translate/TranslateIcon.tsx b/src/plugins/translate/TranslateIcon.tsx
index d944ec1..af97a53 100644
--- a/src/plugins/translate/TranslateIcon.tsx
+++ b/src/plugins/translate/TranslateIcon.tsx
@@ -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 }) => (