|
|
|
|
@ -3,6 +3,7 @@ import { useState } from 'react' |
|
|
|
|
import styled from 'styled-components/macro' |
|
|
|
|
|
|
|
|
|
import map from 'lodash/map' |
|
|
|
|
import isNull from 'lodash/isNull' |
|
|
|
|
|
|
|
|
|
import { MDASH } from 'config' |
|
|
|
|
import { SelectSubscriptionData } from 'requests' |
|
|
|
|
@ -33,7 +34,15 @@ import { |
|
|
|
|
export const ChooseSub = styled.div` |
|
|
|
|
font-weight: 600; |
|
|
|
|
font-size: 16px; |
|
|
|
|
margin: 30px 0; |
|
|
|
|
margin: 35px 0 17px; |
|
|
|
|
` |
|
|
|
|
|
|
|
|
|
export const ChooseSubItem = styled(Item)` |
|
|
|
|
min-height: auto; |
|
|
|
|
` |
|
|
|
|
|
|
|
|
|
export const ChooseSubList = styled(List)` |
|
|
|
|
height: auto; |
|
|
|
|
` |
|
|
|
|
|
|
|
|
|
export const SelectSubscriptionStep = () => { |
|
|
|
|
@ -57,7 +66,7 @@ export const SelectSubscriptionStep = () => { |
|
|
|
|
...subscription.packages, |
|
|
|
|
season: initialSubscription.season, |
|
|
|
|
}) |
|
|
|
|
setActive(index) |
|
|
|
|
index === active ? setActive(null) : setActive(index) |
|
|
|
|
setSelectSubName(subscription.lexic) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -77,10 +86,10 @@ export const SelectSubscriptionStep = () => { |
|
|
|
|
</HeaderActions> |
|
|
|
|
</Header> |
|
|
|
|
<Body marginTop={15}> |
|
|
|
|
<List> |
|
|
|
|
<ChooseSubList> |
|
|
|
|
{ |
|
|
|
|
map(initialSubscription.data, (subscription, index) => ( |
|
|
|
|
<Item |
|
|
|
|
<ChooseSubItem |
|
|
|
|
key={subscription.id} |
|
|
|
|
onClick={() => onItemClick(subscription, index)} |
|
|
|
|
active={active === index} |
|
|
|
|
@ -96,17 +105,17 @@ export const SelectSubscriptionStep = () => { |
|
|
|
|
<T9n t={subscription.lexic3} /> |
|
|
|
|
</Description> |
|
|
|
|
</InfoWrapper> |
|
|
|
|
</Item> |
|
|
|
|
</ChooseSubItem> |
|
|
|
|
)) |
|
|
|
|
} |
|
|
|
|
</List> |
|
|
|
|
</ChooseSubList> |
|
|
|
|
</Body> |
|
|
|
|
<Footer> |
|
|
|
|
{loader |
|
|
|
|
? <ArrowLoader width='204px' disabled /> |
|
|
|
|
: ( |
|
|
|
|
<Button |
|
|
|
|
disabled={!selectedSubscriptionPackage} |
|
|
|
|
disabled={!selectedSubscriptionPackage || isNull(active)} |
|
|
|
|
onClick={onChooseSub} |
|
|
|
|
> |
|
|
|
|
<T9n t='next_choose' /> |
|
|
|
|
|