2504bffdfa
* Reset 'loaded' state in Featured Product and Category blocks * Minor code improvements * Remove state from ApiErrorPlaceholder * Move getProduct to a HOC * Undo changes in Featured Category * Update proptypes * Move error messages to <ApiErrorPlaceholder> * Reorder props * Move lifecycle methods to HOC * Make <FeaturedProduct> component presentational * Move withProduct to js/hocs * Create NAMESPACE constant in utils * Create getProduct util function * Set 'error' and 'product' state to null instead of 'false' when they have no value * Prevent getImageSrcFromProduct and getImageIdFromProduct returning an error when 'product' is not an object * Add HOC tests * Use 'toBe' and 'toBeNull' jest expect methods instead of 'toEqual' when possible * Export HOCs from index * Move mock implementation to beforeEach |
||
---|---|---|
.. | ||
index.js |