Skip to content

Commit

Permalink
Merge pull request #1524 from ArielCalisaya/dev-path-4
Browse files Browse the repository at this point in the history
fix visual bug with margin of card
  • Loading branch information
tommygonzaleza authored Jun 25, 2024
2 parents a6cf3f7 + b7461a8 commit 069aca9
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 95 deletions.
1 change: 0 additions & 1 deletion src/common/components/MarkDownParser/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,6 @@ function MarkDownParser({
const urlToClone = currentData?.url || currentData?.readme_url?.split('/blob')?.[0];
const repoName = urlToClone?.split('/')?.pop();

console.log('current:DATA:::', currentData);
return (
<>
<SimpleModal
Expand Down
178 changes: 89 additions & 89 deletions src/common/components/MktRecommendedCourses.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,99 +69,99 @@ function MktRecommendedCourses({ id, technologies, background, gridColumn, endpo
}, []);

return courses.length > 0 && (
<Box
maxWidth="1280px"
margin="2rem auto"
flexWrap={{ base: 'wrap', xl: 'nowrap' }}
id={id || 'recommended-courses'}
borderRadius="11px"
padding="16px"
mx={{ base: '10px', md: '2rem' }}
background={background || featuredLight}
display="flex"
border="1px solid"
borderColor={hexColor.borderColor}
gap="10px"
{...rest}
>
<Box width="100%" maxWidth="1280px" margin="2rem auto">
<Box
flexShrink="2"
// minWidth="170px"
maxWidth={{ base: 'none', lg: '270px' }}
mx={{ base: '10px', md: '2rem' }}
flexWrap={{ base: 'wrap', xl: 'nowrap' }}
id={id || 'recommended-courses'}
borderRadius="11px"
padding="16px"
background={background || featuredLight}
display="flex"
flexDirection="column"
justifyContent="center"
>
{title ? (
<>
<Heading
as="h2"
size="30px"
fontWeight="700"
color={fontColor}
>
{title}
</Heading>
</>
) : (
<>
<Heading
as="h2"
size="30px"
fontWeight="700"
color={fontColor}
>
{t('continue-learning')}
</Heading>
{technologiesTitle && technologiesTitle.length > 0 && (
<Text size="18px" fontWeight="400" mt="0 !important">
{t('technologies-and-more', { technologies: technologiesTitle })}
</Text>
)}
</>
)}
</Box>
<Box
as="aside"
flexGrow="1"
flexShrink={{ base: '1', xl: '0' }}
justifyContent={{
base: 'center',
// md: courses.length > 1 ? 'space-between' : 'center',
xl: 'flex-end',
}}
display="flex"
flexWrap={{ base: 'wrap', lg: 'nowrap' }}
border="1px solid"
borderColor={hexColor.borderColor}
gap="10px"
{...rest}
>
{courses.map((course) => (
<PublicCourseCard
key={course.slug}
mx={{ base: courses.length === 1 && 'auto', md: '0' }}
// width={{ base: courses.length === 1 ? '99%' : '300px', sm: '300px' }}
width={{ base: '100%', md: 'auto' }}
maxWidth={{ base: 'none', md: '240px' }}
icon_url={course.icon_url}
iconBackground="#25BF6C"
onClick={() => {
setStorageItem('redirected-from', course?.course_translation?.landing_url);
reportDatalayer({
dataLayer: {
event: 'ad_interaction',
course_slug: course.slug,
course_title: course.title,
ad_position: 'bottom-center',
ad_type: 'course',
},
});
}}
href={course?.course_translation?.landing_url}
programName={course.course_translation.title}
programSlug={course.slug}
programDescription={course.course_translation.description}
// flexShrink="0"
/>
))}
<Box
flexShrink="2"
// minWidth="170px"
maxWidth={{ base: 'none', lg: '270px' }}
display="flex"
flexDirection="column"
justifyContent="center"
>
{title ? (
<>
<Heading
as="h2"
size="30px"
fontWeight="700"
color={fontColor}
>
{title}
</Heading>
</>
) : (
<>
<Heading
as="h2"
size="30px"
fontWeight="700"
color={fontColor}
>
{t('continue-learning')}
</Heading>
{technologiesTitle && technologiesTitle.length > 0 && (
<Text size="18px" fontWeight="400" mt="0 !important">
{t('technologies-and-more', { technologies: technologiesTitle })}
</Text>
)}
</>
)}
</Box>
<Box
as="aside"
flexGrow="1"
flexShrink={{ base: '1', xl: '0' }}
justifyContent={{
base: 'center',
// md: courses.length > 1 ? 'space-between' : 'center',
xl: 'flex-end',
}}
display="flex"
flexWrap={{ base: 'wrap', lg: 'nowrap' }}
gap="10px"
>
{courses.map((course) => (
<PublicCourseCard
key={course.slug}
mx={{ base: courses.length === 1 && 'auto', md: '0' }}
// width={{ base: courses.length === 1 ? '99%' : '300px', sm: '300px' }}
width={{ base: '100%', md: 'auto' }}
maxWidth={{ base: 'none', md: '240px' }}
icon_url={course.icon_url}
iconBackground="#25BF6C"
onClick={() => {
setStorageItem('redirected-from', course?.course_translation?.landing_url);
reportDatalayer({
dataLayer: {
event: 'ad_interaction',
course_slug: course.slug,
course_title: course.title,
ad_position: 'bottom-center',
ad_type: 'course',
},
});
}}
href={course?.course_translation?.landing_url}
programName={course.course_translation.title}
programSlug={course.slug}
programDescription={course.course_translation.description}
// flexShrink="0"
/>
))}
</Box>
</Box>
</Box>
);
Expand Down
9 changes: 4 additions & 5 deletions src/common/components/ShowPrices.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ function PlanCard({ item, i, handleSelect, selectedIndex }) {
function ShowPrices({
data,
title,
firstSectionTitle,
secondSectionTitle,
notReady,
list,
Expand All @@ -77,7 +76,7 @@ function ShowPrices({
}) {
const [selectedIndex, setSelectedIndex] = useState(defaultIndex);
const [selectedFinanceIndex, setSelectedFinanceIndex] = useState(defaultFinanceIndex);
const { t } = useTranslation('');
const { t } = useTranslation('profile');
const { fontColor, disabledColor, featuredColor } = useStyle();
const router = useRouter();

Expand Down Expand Up @@ -156,7 +155,9 @@ function ShowPrices({
}}
{...paymentTabStyle}
>
{firstSectionTitle || data?.pricing['one-payment']}
{finance?.length > 0
? t('subscription.upgrade-modal.one_payment')
: t('subscription.upgrade-modal.subscription')}
</Box>

<Box
Expand Down Expand Up @@ -221,7 +222,6 @@ function ShowPrices({
ShowPrices.propTypes = {
data: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.any])),
title: PropTypes.string,
firstSectionTitle: PropTypes.string,
secondSectionTitle: PropTypes.string,
notReady: PropTypes.string,
list: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.any])),
Expand All @@ -238,7 +238,6 @@ ShowPrices.propTypes = {
ShowPrices.defaultProps = {
data: null,
title: null,
firstSectionTitle: null,
secondSectionTitle: null,
notReady: null,
list: null,
Expand Down

0 comments on commit 069aca9

Please sign in to comment.