Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

guest login and favorite bug fix #227

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion constants/RecordIds.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
Expand Down
4 changes: 2 additions & 2 deletions lib/mapUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -381,7 +381,7 @@ export async function toggleFavoriteStore(navigation, storeId) {
);
}
}
await updateCustomer(customerId, {
await updateCustomer(customerId.id, {
favoriteStoreIds: favoriteStores,
});
success = true;
Expand Down
2 changes: 1 addition & 1 deletion navigation/DrawerContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -100,6 +99,7 @@ function DrawerContent(props) {
}

const isGuest = customer.name === 'Guest';

return (
<View
style={{
Expand Down