@treely/strapi-slices 3.2.0 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/slices/TextWithCard/TextWithCard.d.ts +4 -2
- package/dist/strapi-slices.cjs.development.js +2 -2
- package/dist/strapi-slices.cjs.development.js.map +1 -1
- package/dist/strapi-slices.cjs.production.min.js +1 -1
- package/dist/strapi-slices.cjs.production.min.js.map +1 -1
- package/dist/strapi-slices.esm.js +2 -2
- package/dist/strapi-slices.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/slices/TextWithCard/TextWithCard.tsx +4 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import StrapiLink from '../../models/strapi/StrapiLink';
|
|
3
3
|
import StrapiProjectCard from '../../models/strapi/StrapiProjectCard';
|
|
4
|
-
import {
|
|
4
|
+
import { IStrapiData, PortfolioProject, StrapiProject } from '../..';
|
|
5
5
|
interface TextWithCardSlice {
|
|
6
6
|
tagline?: string;
|
|
7
7
|
title: string;
|
|
@@ -12,7 +12,9 @@ interface TextWithCardSlice {
|
|
|
12
12
|
}[];
|
|
13
13
|
button?: StrapiLink;
|
|
14
14
|
card?: StrapiProjectCard;
|
|
15
|
-
project?:
|
|
15
|
+
project?: {
|
|
16
|
+
data?: IStrapiData<StrapiProject>;
|
|
17
|
+
};
|
|
16
18
|
cardPosition: 'left' | 'right';
|
|
17
19
|
}
|
|
18
20
|
export interface TextWithCardProps {
|
|
@@ -2418,8 +2418,8 @@ var TextWithCard = function TextWithCard(_ref) {
|
|
|
2418
2418
|
var slice = _ref.slice,
|
|
2419
2419
|
projects = _ref.projects;
|
|
2420
2420
|
var portfolioProject = projects.find(function (p) {
|
|
2421
|
-
var _slice$project
|
|
2422
|
-
return ((_slice$project = slice.project) == null ? void 0 : _slice$project.
|
|
2421
|
+
var _slice$project;
|
|
2422
|
+
return ((_slice$project = slice.project) == null || (_slice$project = _slice$project.data) == null ? void 0 : _slice$project.attributes.fpmProjectId) && p.id === slice.project.data.attributes.fpmProjectId;
|
|
2423
2423
|
});
|
|
2424
2424
|
var card = React__default.default.createElement(boemly.GridItem, {
|
|
2425
2425
|
colSpan: [4, null, null, null, 2],
|