From 38000bbef6224bad43bdb30b39b11ee366d6d122 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Fri, 22 Mar 2024 11:58:19 -0500 Subject: [PATCH] Check for Trans component --- src/components/Button.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/Button.tsx b/src/components/Button.tsx index a3cf185c9a..67c33fa0c6 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -12,6 +12,7 @@ import { ViewStyle, } from 'react-native' import LinearGradient from 'react-native-linear-gradient' +import {Trans} from '@lingui/macro' import {logger} from '#/logger' import {android, atoms as a, flatten, tokens, useTheme} from '#/alf' @@ -405,7 +406,9 @@ export function Button({ )} - {typeof children === 'string' ? ( + {/* @ts-ignore */} + {typeof children === 'string' || children?.type === Trans ? ( + /* @ts-ignore */ {children} ) : typeof children === 'function' ? ( children(context)