update adding demo app,

This commit is contained in:
louiscklaw
2025-06-04 14:46:31 +08:00
parent b78709db9b
commit dff07ddcb0
82 changed files with 3552 additions and 97 deletions

View File

@@ -0,0 +1,9 @@
import { createSelector } from 'reselect';
const getState = state => state;
// General getters
export const getFavourites = createSelector(getState, state => state.favourites);
export const checkFavourites = product => createSelector(getState, state => state.favourites.includes(product));
export const getCart = createSelector(getState, state => state.cart);
export const getCartCount = createSelector(getState, state => state.cart.length);