This commit updates the Redux store so that the new clone API end points can be used. The composes slice is updated - composes now have a clones property - and a clones slice is added. Selectors are added as well. Although not used in this commit, the selectors will allow us to significantly simplify our React components that need to retreive data from the store. We now must work with both `composes` and `clones`. `Composes` and `clones` have slightly different schema in the Redux store because of differences in their API responses (the store schema generally mirrors the API response schema). Selectors are defined for `images` that work for both `composes` and `clones`. Using selectors allows our React components to interact with the Redux store as if it were a database - components can simply query the store by id using a selector. This hugely simplifies our React components - they no longer need to accept multiple props related to a `compose` (or `clone` or `image`). They can simply take a `composeId` (or `cloneId` or `imageId`) prop and use an appropriate selector to obtain the necessary information. Selectors also encapsulate the store schema. Components no longer need to know about the store schema to get information about an image - they simply use a selector and in return receive a normalized (and flat) object. This means that in the future we could easily migrate the API and slices to RTK Query without the need to modify any of our React components. |
||
|---|---|---|
| .. | ||
| isRhel.js | ||
| path.js | ||
| time.js | ||