From 443c37ce4a28e6b07ac043dbd9c81a9b20eb5fb1 Mon Sep 17 00:00:00 2001 From: Bartosz Grajdek Date: Sun, 5 Nov 2023 14:21:20 +0100 Subject: [PATCH 1/3] Rename environmentBadge --- src/components/{EnvironmentBadge.js => EnvironmentBadge.tsx} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/components/{EnvironmentBadge.js => EnvironmentBadge.tsx} (100%) diff --git a/src/components/EnvironmentBadge.js b/src/components/EnvironmentBadge.tsx similarity index 100% rename from src/components/EnvironmentBadge.js rename to src/components/EnvironmentBadge.tsx From a0139714bf02e4c5f31031e615656fd0565f99fb Mon Sep 17 00:00:00 2001 From: Bartosz Grajdek Date: Sun, 5 Nov 2023 14:25:13 +0100 Subject: [PATCH 2/3] Migrate EnvironmentBadge to TS --- src/components/EnvironmentBadge.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/EnvironmentBadge.tsx b/src/components/EnvironmentBadge.tsx index a9236fc50abe..02d92e0bf0f9 100644 --- a/src/components/EnvironmentBadge.tsx +++ b/src/components/EnvironmentBadge.tsx @@ -17,7 +17,7 @@ function EnvironmentBadge() { const {environment} = useEnvironment(); // If we are on production, don't show any badge - if (environment === CONST.ENVIRONMENT.PRODUCTION) { + if (environment === CONST.ENVIRONMENT.PRODUCTION || environment === undefined) { return null; } From eb6d7e020e70afff420f8d2488f8fde512e58e44 Mon Sep 17 00:00:00 2001 From: Bartosz Grajdek Date: Sun, 19 Nov 2023 15:58:01 +0100 Subject: [PATCH 3/3] fix: resolve merge conflicts --- src/components/Badge.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Badge.tsx b/src/components/Badge.tsx index 22c056dfdfc4..575646f7dd9c 100644 --- a/src/components/Badge.tsx +++ b/src/components/Badge.tsx @@ -29,7 +29,7 @@ type BadgeProps = { textStyles?: StyleProp; /** Callback to be called on onPress */ - onPress: (event?: GestureResponderEvent | KeyboardEvent) => void; + onPress?: (event?: GestureResponderEvent | KeyboardEvent) => void; }; function Badge({success = false, error = false, pressable = false, text, environment = CONST.ENVIRONMENT.DEV, badgeStyles, textStyles, onPress = () => {}}: BadgeProps) {