good enough for government (or habitat) work
This commit is contained in:
@ -146,10 +146,14 @@ const productsState = createSlice({
|
||||
}
|
||||
});
|
||||
|
||||
export const selectProducts = (state: RootState) => {
|
||||
return state.products.map(obj => Product.fromObject(obj));
|
||||
export const selectProductsDatas = (state: RootState) => {
|
||||
return state.products;
|
||||
}
|
||||
|
||||
export const selectProducts = createSelector([selectProductsDatas], productsData => {
|
||||
return productsData.map(d => Product.fromObject(d));
|
||||
})
|
||||
|
||||
export const selectProductIds = createSelector([selectProducts], products => {
|
||||
return products.map(p => p.id);
|
||||
})
|
||||
|
Reference in New Issue
Block a user