From 52967025c8d545e2db2932cd537c24a5c3d62994 Mon Sep 17 00:00:00 2001 From: Steffly Date: Thu, 23 Feb 2023 21:03:14 -0800 Subject: [PATCH] Minor fixes --- configOption.tsx | 4 ++-- hostApp.tsx | 24 +++++++++++++----------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/configOption.tsx b/configOption.tsx index 2d6cb61..f0ce800 100644 --- a/configOption.tsx +++ b/configOption.tsx @@ -21,8 +21,8 @@ export function ConfigOption({ value, label, onChangeText, options }: ConfigOpti Options
- {options.map((option) => - + {options.map((option, idx) => + )}
diff --git a/hostApp.tsx b/hostApp.tsx index f5ffd79..563bb5f 100644 --- a/hostApp.tsx +++ b/hostApp.tsx @@ -41,17 +41,19 @@ export function HostApp({ env: defaultEnv }: HostAppProps) { } React.useEffect(() => { - Remitly.initialize({ - appId, - customerCountry, - customerLanguage, - defaultReceiveCountry: receiveCountry, - environment: environment as Environments, - enableConsoleLogs: true, - onMessage, - onStateChange: setRemitlyState - }); - }, [appId, customerCountry, customerLanguage, receiveCountry, environment]); + if (Remitly) { + Remitly.initialize({ + appId, + customerCountry, + customerLanguage, + defaultReceiveCountry: receiveCountry, + environment: environment as Environments, + enableConsoleLogs: true, + onMessage, + onStateChange: setRemitlyState + }); + } + }, [appId, customerCountry, customerLanguage, receiveCountry, environment, Remitly]); function addText() { setAllowIncreasedHeight(true);