From 848adcca3924161d14130f208349827f8ea1f1af Mon Sep 17 00:00:00 2001
From: PolyakovaM <55061222+PolyakovaM@users.noreply.github.com>
Date: Fri, 19 Nov 2021 12:54:44 +0300
Subject: [PATCH] feat(ott-1726): choise subscriptions fix (#568)
---
.../components/SelectSubscription/index.tsx | 23 +++++++++++++------
.../SubscriptionSelectionStep/index.tsx | 5 ++--
.../components/SubscriptionsList/styled.tsx | 3 +--
.../BuyMatchPopup/store/hooks/index.tsx | 3 ++-
.../store/hooks/useSubscriptions.tsx | 11 +++++++--
src/features/BuyMatchPopup/styled.tsx | 8 ++-----
src/features/PaymentPeriodTabs/index.tsx | 11 +++------
7 files changed, 35 insertions(+), 29 deletions(-)
diff --git a/src/features/BuyMatchPopup/components/SelectSubscription/index.tsx b/src/features/BuyMatchPopup/components/SelectSubscription/index.tsx
index 6b12f02e..67bd9741 100644
--- a/src/features/BuyMatchPopup/components/SelectSubscription/index.tsx
+++ b/src/features/BuyMatchPopup/components/SelectSubscription/index.tsx
@@ -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 = () => {
-
+
{
map(initialSubscription.data, (subscription, index) => (
- - onItemClick(subscription, index)}
active={active === index}
@@ -96,17 +105,17 @@ export const SelectSubscriptionStep = () => {
-
+
))
}
-
+