diff --git a/constants/RecordIds.js b/constants/RecordIds.js index 7d2aac48..d309c3f7 100644 --- a/constants/RecordIds.js +++ b/constants/RecordIds.js @@ -18,7 +18,7 @@ if (env === 'dev') { // IDs from PROD base } else if (env === 'prod') { RecordIds.testCustomerId = 'recomWMtzSUQCcIvr'; - RecordIds.guestCustomerId = 'recxEGfvExP4Dv8nr'; + RecordIds.guestCustomerId = 'recHSoc8R94UYNIR5'; RecordIds.defaultStoreId = 'recwQ6SoM5pEj37xl'; RecordIds.surveyStoreId = 'recQa6jv9KGqobDAZ'; } diff --git a/lib/mapUtils.js b/lib/mapUtils.js index 34d90672..3b2de2c8 100644 --- a/lib/mapUtils.js +++ b/lib/mapUtils.js @@ -356,7 +356,7 @@ export async function toggleFavoriteStore(navigation, storeId) { ] ); } else { - const cust = await getCustomerById(customerId); + const cust = await getCustomerById(customerId.id); let favoriteStores = cust.favoriteStoreIds || []; if (favoriteStores.includes(storeId)) { @@ -381,7 +381,7 @@ export async function toggleFavoriteStore(navigation, storeId) { ); } } - await updateCustomer(customerId, { + await updateCustomer(customerId.id, { favoriteStoreIds: favoriteStores, }); success = true; diff --git a/navigation/DrawerContent.js b/navigation/DrawerContent.js index 5c9e3565..e818a5ae 100644 --- a/navigation/DrawerContent.js +++ b/navigation/DrawerContent.js @@ -44,7 +44,6 @@ function DrawerContent(props) { const fetchUser = async () => { try { const customerId = await getAsyncCustomerAuth(); - let cust = null; if (customerId != null) { cust = await getCustomerById(customerId.id); @@ -100,6 +99,7 @@ function DrawerContent(props) { } const isGuest = customer.name === 'Guest'; + return (