Skip to content

Commit cc2f8e1

Browse files
authored
product-course content (#184)
* plugged scope-content with props, toggling level content from sandbox * remove logic from sandbox, added _props on sandbox * linked with levels * prepared fixtures (https://github.com/CoorpAcademy/coorpacademy-api-catalog/issues/35) * plugged scope-content with props, toggling level content from sandbox * remove logic from sandbox, added _props on sandbox * linked with levels * prepared fixtures (https://github.com/CoorpAcademy/coorpacademy-api-catalog/issues/35) * using product-course fixture to prepare scope-content * tabs name * add course scope * fixtures + checkers * add retina image * displaying an empty product-course * fix debugger and mobile image size * displaying an empty catalog * fix fixtures discipline header * displaying an empty discipline-header * Fix catalog
1 parent 54e3f66 commit cc2f8e1

File tree

19 files changed

+1108
-136
lines changed

19 files changed

+1108
-136
lines changed

src/@coorpacademy/components/molecule/catalog-card/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import style from './catalog-card.css';
99
const conditions = checker.shape({
1010
props: checker.shape({
1111
product: checker.shape({
12-
images: checker.array
12+
images: checker.object
1313
})
1414
}),
1515
children: checker.none
@@ -29,7 +29,7 @@ export default (treant, options = {}) => {
2929
const {product} = props;
3030
const total = 5;
3131

32-
const {href = ''} = product;
32+
const href = getOr('', 'href', product);
3333

3434
return (
3535
<li className={style.catalogListItem}>

src/@coorpacademy/components/molecule/categories/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default (treant, options = {}) => {
1414

1515
const Link = createLink(treant, options);
1616

17-
const Categories = ({categories}, children) => {
17+
const Categories = ({categories = []}, children) => {
1818
const CategoriesDiv = categories.map(category => (
1919
<li className={style.filter}>
2020
<Link

src/@coorpacademy/components/molecule/discipline-header/discipline-header.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ img {
5757

5858
.imgWrapper {
5959
flex: none;
60+
height: auto;
6061
}
6162

6263
.courseWrapper {

src/@coorpacademy/components/molecule/discipline-header/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ export default (treant, options = {}) => {
1818
const {h} = treant;
1919
const {product} = props;
2020

21+
const image = getOr(null, 'images.discipline_full_retina.url.https', product);
22+
2123
return (
2224
<div className={style.wrapper}>
2325
<div className={style.imgWrapper}>
2426
<img
25-
src={getOrBlank('images.0.url.https', product)}
27+
src={image}
2628
/>
2729
</div>
2830
<div className={style.courseWrapper}>

0 commit comments

Comments
 (0)