Skip to content

Commit

Permalink
Merge branch 'feat/countdown-in-program-package-plan'
Browse files Browse the repository at this point in the history
  • Loading branch information
Logos50607 committed Jan 14, 2025
2 parents 069e0d7 + 997c474 commit 0584c66
Show file tree
Hide file tree
Showing 4 changed files with 857 additions and 1 deletion.
14 changes: 14 additions & 0 deletions src/components/package/ProgramPackagePlanCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { ProgramPackagePlanProps } from '../../types/programPackage'
import PaymentButton from '../common/PaymentButton'
import PriceLabel from 'lodestar-app-element/src/components/labels/PriceLabel'
import { BraftContent } from 'lodestar-app-element/src/components/common/StyledBraftEditor'
import CountDownTimeBlock from '../common/CountDownTimeBlock'

const StyledCard = styled.div`
padding: 1.5rem;
Expand All @@ -33,6 +34,13 @@ const StyledEnrollment = styled.div`
letter-spacing: 0.18px;
`

const StyledCountDownBlock = styled.div`
margin-top: 20px;
span {
font-size: 14px;
}
`

const ProgramPackagePlanCard: React.VFC<
ProgramPackagePlanProps & {
programPackageId: string
Expand All @@ -46,6 +54,7 @@ const ProgramPackagePlanCard: React.VFC<
description,
isSubscription,
isParticipantsVisible,
isCountdownTimerVisible,
periodAmount,
periodType,
listPrice,
Expand All @@ -71,6 +80,11 @@ const ProgramPackagePlanCard: React.VFC<
periodType={isSubscription ? periodType : undefined}
periodAmount={isSubscription ? periodAmount : undefined}
/>
{isCountdownTimerVisible && soldAt && isOnSale && (
<StyledCountDownBlock>
<CountDownTimeBlock expiredAt={soldAt} />
</StyledCountDownBlock>
)}
<Divider className="my-3" />
{!isSubscription && periodAmount && periodType && (
<StyledHighlight className="mb-3">
Expand Down
Loading

0 comments on commit 0584c66

Please sign in to comment.