Skip to content

Commit

Permalink
Merge pull request #18 from isuyashpatel/dev
Browse files Browse the repository at this point in the history
Bug Fix
  • Loading branch information
isuyashpatel authored Jan 9, 2024
2 parents 25763a0 + 984b399 commit 15459ea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion android/app/src/main/assets/index.android.bundle

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions src/store/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export const useStore = create(
if (state.BeanList[i].id == id) {
if (state.BeanList[i].favourite == false) {
state.BeanList[i].favourite = true;
state.FavoritesList.unshift(state.BeanList[i]);
state.FavouriteList.unshift(state.BeanList[i]);
} else {
state.BeanList[i].favourite = false;
}
Expand All @@ -111,7 +111,7 @@ export const useStore = create(
break;
}
}
} else if (type == 'Beans') {
} else if (type == 'Bean') {
for (let i = 0; i < state.BeanList.length; i++) {
if (state.BeanList[i].id == id) {
if (state.BeanList[i].favourite == true) {
Expand All @@ -124,13 +124,13 @@ export const useStore = create(
}
}
let spliceIndex = -1;
for (let i = 0; i < state.FavoritesList.length; i++) {
if (state.FavoritesList[i].id == id) {
for (let i = 0; i < state.FavouriteList.length; i++) {
if (state.FavouriteList[i].id == id) {
spliceIndex = i;
break;
}
}
state.FavoritesList.splice(spliceIndex, 1);
state.FavouriteList.splice(spliceIndex, 1);
}),
),
incrementCartItemQuantity: (id: string, size: string): void =>
Expand Down

0 comments on commit 15459ea

Please sign in to comment.