Ott 1111 redesign (#435)

* refactor(1115): added some design tokens (#362)

* style(1115): login page redesign (#363)

* style(1115): password reset popup (#364)

* Ott 1117 part 1 (#365)

* style(1115): redesign

* refactor(1115): auth refactor

* refactor(1115): removed old registration step components (#366)

* style(1114): user favorites (#367)

* style(1114): user favorites

* Update src/features/UserFavorites/TooltipBlock/styled.tsx

Co-authored-by: Andrey Razdorskiy <quitesocial@yandex.ru>

* Update src/features/UserFavorites/TooltipBlock/styled.tsx

Co-authored-by: Andrey Razdorskiy <quitesocial@yandex.ru>

Co-authored-by: Andrey Razdorskiy <quitesocial@yandex.ru>

* Ott 1112 header (#372)

* style(1112): removed old components

* style(1112): header redesign (#369)

* style(1112): wip (#370)

* style(1112): date filter (#371)

Co-authored-by: Ruslan Khayrullin <ruslfm08@gmail.com>

* Ott 1133 profile header color (#374)

* refactor(1133): removed unused AvailableMatches

* feat(1133): dynamic header gradient

* Ott 1113 home page (#375)

* fix(1113): date filter day click fix

* style(1113): match list

* fix(1113): comment fix

* fix(1113): date filter bug fix

* style(#ott1167): responsive styles added (#377)

Co-authored-by: Farber Denis <denis.farber@instatsport.com>

* Ott 1186 match page (#381)

* refactor: removed extended search page (#379)

* Ott 1186 part 2 (#380)

* style: match page redesign

* style: restyled right playlists block

* style: responsive date filter

* fix(1197): display country flag in match card (#383)

* style(1188): reduced match preview brightness (#384)

* fix(1191): hover on team logos (#386)

* Ott 1190 remove match popup (#385)

* refactor(1190): redirecting to match profile

* refactor(1190): removed finished match popup

* fix(1190): player, two player stay active on last episode

* style(1121): profile cards (#387)

* style(1212): changed match preview opacity (#389)

* Ott 1119 search (#388)

* refactor(1119): removed SportType filter

* refactor(1119): search redesign

* feat(ott-273): scaling every element on the site (#391)

* feat(ott-273): scaling every element on the site

* refactor(ott-273): short fix for PR

* fix(1111): fixed styled theme color reference (#392)

* Ott 1211 finished match side block (#396)

* refactor(1211): finished match right block redesign

* feat(ott-1211): added lexics to match side playlists (#394)

* refactor(ott-1211): added lexics to side playlists

* refactor(ott-1211): refactor

Co-authored-by: Mirlan <m.maksitaliev@gmail.com>

* refactor(ott-1124): live match popup new design (#398)

* Ott 1127 user account redesign (#402)

* refactor(1127): removed subs select modal in user account (#397)

* style(1127): user account redesign (#399)

* Ott 1127 part 3 (#400)

* refactor(1127): updated form fields

* refactor(1127): added password inputs

* fix(1127): fixed types

* Ott 1127 part 4 (#401)

* fix(1127): design fixes

* fix(1127): language change

* fix(1127): combobox fix

* fix(1276): video endpoint change (#403)

* Ott 1126 buy match popup (#406)

* fix(ott-1280): return match overview (#407)

* Ott 1249 auth mobile (#408)

* feat(ott-1295): added some changes for preprod build (#409)

* fix(ott-1295): small fix (#410)

* Ott 1250 registration mobile (#411)

* fix(ott-1341): fixed live match label position (#412)

* fix(1345): close popup on live match click (#413)

* fix(ott-1290): fix switch color (#415)

Co-authored-by: Alex <alexnofoget@mail.ru>

* fix(ott-1291): rm target blank on user favourites (#416)

* fix(#1289): added adaptive(1370 px) for pay form (#417)

* fix(#1289): added adaptive(1370 px) for pay form

* refactor(#1289): added space

* Ott 1282 buy match responsive (#414)

* style(#1282): buy match page responcive styles added

* style(#1282): buy match responsive styles added

* style(#1282): cards styles fixes

Co-authored-by: Farber Denis <denis.farber@instatsport.com>

* feat(ott-1388): added env to configure api url (#418)

* Ott 1387 main page mobile (#419)

* style(#1387): main page mobile styles added part 1

* style(#1387): datepicker styles added part 2

* style(#1387): search bar styles fix

* style(#1387): fixed match time icon

* style(#1387): comments fix

Co-authored-by: Farber Denis <denis.farber@instatsport.com>

* fix(ott-1348): show team name abbrs (#420)

* fix(ott-1409): add tournament link (#421)

* feat(ott-1414): added make prod script (#422)

* fix(ott-1413): hide fb google login (#424)

* fix(1407): fixed switch colors (#423)

* Ott 1371 hide pay tab (#425)

* feat(ott-1371): hide unused pay tabs

* feat(ott-1371): code review fix

* feat(ott-1371): code review fix again

* feat(ott-1371): add use memo and correct types

* Ott 1285 video player mobile (#426)

* style(#1285): video player mobile styles added

* style(#1285): min styles fixes

Co-authored-by: Farber Denis <denis.farber@instatsport.com>

* Ott 1394 logging (#427)

* feat(ott-1394): page change logging

* feat(1394): player playlist change logging

* style(#1422): min style fixes (#428)

Co-authored-by: Farber Denis <denis.farber@instatsport.com>

* style(#1423): video player play button fixed (#429)

Co-authored-by: Farber Denis <denis.farber@instatsport.com>

* fix(1396): player fix on ios (#430)

* style(#1431): fixed live popup (#431)

Co-authored-by: Farber Denis <denis.farber@instatsport.com>

* style(fix): payment block style fix (#432)

Co-authored-by: Farber Denis <denis.farber@instatsport.com>

* fix(1434): play hls until has video true (#433)

* fix(1373): show/hide card form labels (#434)

Co-authored-by: Andrey Razdorskiy <quitesocial@yandex.ru>
Co-authored-by: Ruslan Khayrullin <ruslfm08@gmail.com>
Co-authored-by: Farber Denis <42491613+Bombamuerta@users.noreply.github.com>
Co-authored-by: Farber Denis <denis.farber@instatsport.com>
Co-authored-by: Sergiu <46888793+Serj10GR@users.noreply.github.com>
Co-authored-by: Иван Пиминов <61900450+ivan-piminov@users.noreply.github.com>
Co-authored-by: Alex <alexnofoget@mail.ru>
Co-authored-by: Serg <936x936@gmail.com>
Co-authored-by: KarelinDm <58763564+KarelinDm@users.noreply.github.com>
keep-around/af30b88d367751c9e05a735e4a0467a96238ef47
Mirlan 4 years ago committed by GitHub
parent 022ecb0365
commit ada3c6ecfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 22
      Makefile
  2. 2
      public/images/arrowUp.svg
  3. 11
      public/images/basketball-icon.svg
  4. 4
      public/images/clear.svg
  5. 3
      public/images/date.svg
  6. BIN
      public/images/facebook.png
  7. 3
      public/images/football-icon.svg
  8. BIN
      public/images/google.png
  9. 16
      public/images/header-settings.svg
  10. 4
      public/images/hockey-icon.svg
  11. 17
      public/images/logo.svg
  12. 7
      public/images/logout.svg
  13. 17
      public/images/score-switch-mobile-off.svg
  14. 17
      public/images/score-switch-mobile-on.svg
  15. 45
      public/images/score-switch-off.svg
  16. 45
      public/images/score-switch-on.svg
  17. 2
      public/images/search.svg
  18. 11
      public/images/settings.svg
  19. 3
      public/images/visibility.svg
  20. 2
      public/images/worldIcon.svg
  21. 7
      public/index.html
  22. 4
      src/config/env.tsx
  23. 3
      src/config/form.tsx
  24. 26
      src/config/lexics/indexLexics.tsx
  25. 4
      src/config/lexics/public.tsx
  26. 12
      src/config/lexics/userAccount.tsx
  27. 1
      src/config/pages.tsx
  28. 1
      src/config/procedures.tsx
  29. 10
      src/config/routes.tsx
  30. 5
      src/config/userAgent.tsx
  31. 33
      src/features/AddCardForm/components/ElementContainer/index.tsx
  32. 91
      src/features/AddCardForm/components/Form/hooks/index.tsx
  33. 95
      src/features/AddCardForm/components/Form/index.tsx
  34. 15
      src/features/AddCardForm/index.tsx
  35. 42
      src/features/AddCardForm/styled.tsx
  36. 23
      src/features/App/AuthenticatedApp.tsx
  37. 25
      src/features/App/UnauthenticatedApp.tsx
  38. 1
      src/features/Background/styled.tsx
  39. 34
      src/features/BuyMatchPopup/components/CardStep/index.tsx
  40. 46
      src/features/BuyMatchPopup/components/CardsList/index.tsx
  41. 30
      src/features/BuyMatchPopup/components/ErrorStep/index.tsx
  42. 51
      src/features/BuyMatchPopup/components/SelectedCard/index.tsx
  43. 16
      src/features/BuyMatchPopup/components/SubscriptionSelectionStep/index.tsx
  44. 17
      src/features/BuyMatchPopup/components/Subscriptions/index.tsx
  45. 32
      src/features/BuyMatchPopup/components/SubscriptionsList/index.tsx
  46. 160
      src/features/BuyMatchPopup/components/SubscriptionsList/styled.tsx
  47. 32
      src/features/BuyMatchPopup/components/SuccessStep/index.tsx
  48. 9
      src/features/BuyMatchPopup/index.tsx
  49. 23
      src/features/BuyMatchPopup/store/config.tsx
  50. 114
      src/features/BuyMatchPopup/store/helpers.tsx
  51. 39
      src/features/BuyMatchPopup/store/hooks/index.tsx
  52. 25
      src/features/BuyMatchPopup/store/hooks/useLexicsFetcher.tsx
  53. 39
      src/features/BuyMatchPopup/store/hooks/useSubscriptions.tsx
  54. 137
      src/features/BuyMatchPopup/styled.tsx
  55. 16
      src/features/BuyMatchPopup/types.tsx
  56. 14
      src/features/CardsStore/hooks/index.tsx
  57. 21
      src/features/Combobox/hooks/index.tsx
  58. 2
      src/features/Combobox/index.tsx
  59. 3
      src/features/Combobox/types.tsx
  60. 37
      src/features/Common/Arrows/index.tsx
  61. 21
      src/features/Common/Arrows/stories.tsx
  62. 41
      src/features/Common/Button/styled.tsx
  63. 2
      src/features/Common/Checkbox/styled.tsx
  64. 3
      src/features/Common/Input/index.tsx
  65. 127
      src/features/Common/Input/styled.tsx
  66. 14
      src/features/Common/InputGroup/index.tsx
  67. 55
      src/features/Common/NewInput/index.tsx
  68. 84
      src/features/Common/NewInput/styled.tsx
  69. 58
      src/features/Common/PasswordInput/index.tsx
  70. 2
      src/features/Common/Radio/styled.tsx
  71. 93
      src/features/Common/RadioButtons/index.tsx
  72. 22
      src/features/Common/StarIcon/index.tsx
  73. 86
      src/features/Common/Tabs/index.tsx
  74. 5
      src/features/Common/customScrollbar/index.tsx
  75. 7
      src/features/Common/index.tsx
  76. 24
      src/features/ExtendedSearchPage/components/DesktopHeader/index.tsx
  77. 29
      src/features/ExtendedSearchPage/components/Filters/index.tsx
  78. 43
      src/features/ExtendedSearchPage/components/Filters/styled.tsx
  79. 34
      src/features/ExtendedSearchPage/components/GenderFilter/index.tsx
  80. 31
      src/features/ExtendedSearchPage/components/MobileHeader/index.tsx
  81. 42
      src/features/ExtendedSearchPage/components/ProfileFilter/index.tsx
  82. 44
      src/features/ExtendedSearchPage/components/Results/index.tsx
  83. 54
      src/features/ExtendedSearchPage/components/SearchInput/index.tsx
  84. 17
      src/features/ExtendedSearchPage/components/SportTypeFilter/index.tsx
  85. 30
      src/features/ExtendedSearchPage/index.tsx
  86. 41
      src/features/ExtendedSearchPage/store/hooks/index.tsx
  87. 12
      src/features/ExtendedSearchPage/store/hooks/useSearchRequest.tsx
  88. 41
      src/features/ExtendedSearchPage/styled.tsx
  89. 9
      src/features/GlobalStyles/index.tsx
  90. 37
      src/features/HeaderFilters/components/DateFilter/helpers.tsx
  91. 19
      src/features/HeaderFilters/components/DateFilter/hooks/index.tsx
  92. 98
      src/features/HeaderFilters/components/DateFilter/index.tsx
  93. 305
      src/features/HeaderFilters/components/DateFilter/styled.tsx
  94. 27
      src/features/HeaderFilters/components/DatePicker/index.tsx
  95. 136
      src/features/HeaderFilters/components/DatePicker/styled.tsx
  96. 45
      src/features/HeaderFilters/components/MatchStatusFilter/index.tsx
  97. 63
      src/features/HeaderFilters/components/SportTypeFilter/index.tsx
  98. 81
      src/features/HeaderFilters/components/TournamentFilter/hooks.tsx
  99. 63
      src/features/HeaderFilters/components/TournamentFilter/index.tsx
  100. 134
      src/features/HeaderFilters/components/TournamentFilter/styled.tsx
  101. Some files were not shown because too many files have changed in this diff Show More

@ -4,17 +4,27 @@ install:
develop:
npm start
build:
clean:
rm -rf build
REACT_APP_PRODUCTION=false npm run build
production-build:
rm -rf build
REACT_APP_PRODUCTION=true REACT_APP_STRIPE_PK=pk_live_ANI76cBhSo69DZUxPmyRVIZW npm run build
build: clean
REACT_APP_ENV=staging npm run build
preproduction-build: clean
REACT_APP_ENV=preproduction REACT_APP_STRIPE_PK=pk_live_ANI76cBhSo69DZUxPmyRVIZW npm run build
production-build: clean
REACT_APP_ENV=production REACT_APP_STRIPE_PK=pk_live_ANI76cBhSo69DZUxPmyRVIZW npm run build
.PHONY: build
stage: production-build
prod: production-build
rsync -zavP build/ -e 'ssh -p 666' ott@instat.tv:/usr/local/www/ott/wwwroot/
preprod: preproduction-build
rsync -zavP build/ -e 'ssh -p 666' ott-test@test.instat.tv:/usr/local/www/ott-test/wwwroot/
stage: build
rsync -zavP build/ -e 'ssh -p 666' ott-staging@staging.instat.tv:/usr/local/www/ott-staging/wwwroot/
a-stage: build

@ -1,3 +1,3 @@
<svg width="12" height="8" viewBox="0 0 12 8" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.6 8L6 3.4L1.4 8L0 6.6L6 0.6L12 6.6L10.6 8Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.6 8L6 3.4L1.4 8L0 6.6L6 0.6L12 6.6L10.6 8Z" fill="#999999"/>
</svg>

Before

Width:  |  Height:  |  Size: 213 B

After

Width:  |  Height:  |  Size: 215 B

@ -0,0 +1,11 @@
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<clip-path d="M0,0h40v40h-40z"/>
<path d="M20.298,0.006L20.148,0.006A19.268,19.268 0,0 0,25.264 13.7L33.612,5.353A20.011,20.011 0,0 0,20.298 0Z" fill="#f1903b"/>
<path d="M18.666,0.064a20.011,20.011 0,0 0,-12.261 5.3l13.6,13.6 4.21,-4.21A20.753,20.753 0,0 1,18.666 0.064Z" fill="#f1903b"/>
<path d="M5.35,6.407A20.011,20.011 0,0 0,0.065 18.674,20.746 20.746,0 0,1 14.75,24.218l4.2,-4.2Z" fill="#f1903b"/>
<path d="M34.65,6.416 L26.31,14.76A19.261,19.261 0,0 0,40 19.875,20.011 20.011,0 0,0 34.65,6.416Z" fill="#f1903b"/>
<path d="M25.264,15.804 L21.054,20.013 34.662,33.62A20.011,20.011 0,0 0,39.945 21.354,20.763 20.763,0 0,1 25.264,15.804Z" fill="#f1903b"/>
<path d="M0.693,20.135c-0.226,0 -0.453,0.015 -0.68,0.021A20.011,20.011 0,0 0,5.36 33.612L13.708,25.269A19.265,19.265 0,0 0,0.693 20.136Z" fill="#f1903b"/>
<path d="M20.007,21.063l-4.2,4.2a20.755,20.755 0,0 1,5.553 14.7,20.011 20.011,0 0,0 12.249,-5.3Z" fill="#f1903b"/>
<path d="M14.757,26.312 L6.399,34.67a20.011,20.011 0,0 0,13.471 5.347A19.26,19.26 0,0 0,14.757 26.312Z" fill="#f1903b"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -1,3 +1,3 @@
<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
<path opacity="0.4" fill-rule="evenodd" clip-rule="evenodd" d="M10 1L9 0L5 4L1 0L0 1L4 5L0 9L1 10L5 6L9 10L10 9L6 5L10 1Z" fill="white" fill-opacity="0.5"/>
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M8 0C12.4183 0 16 3.58172 16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0ZM10.4657 4.26022L8 6.727L5.5357 4.26022C5.18423 3.90875 4.61438 3.90875 4.26291 4.26022C3.91144 4.6117 3.91144 5.18154 4.26291 5.53302L6.728 8.001L4.26291 10.47C3.91144 10.8215 3.91144 11.3913 4.26291 11.7428C4.61438 12.0943 5.18423 12.0943 5.5357 11.7428L8 9.275L10.4657 11.7428C10.8172 12.0943 11.387 12.0943 11.7385 11.7428C12.09 11.3913 12.09 10.8215 11.7385 10.47L9.272 8.001L11.7385 5.53302C12.09 5.18154 12.09 4.6117 11.7385 4.26022C11.387 3.90875 10.8172 3.90875 10.4657 4.26022Z" fill="white" fill-opacity="0.5"/>
</svg>

Before

Width:  |  Height:  |  Size: 262 B

After

Width:  |  Height:  |  Size: 742 B

@ -0,0 +1,3 @@
<svg width="100%" height="100%" viewBox="0 0 100% 100%" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M25.2659 3.62109C25.9389 4.26715 26.317 5.14339 26.317 6.05706V22.1336C26.317 23.0473 25.9389 23.9235 25.2659 24.5696C24.5929 25.2156 23.6801 25.5786 22.7283 25.5786H3.58868C2.6369 25.5786 1.72411 25.2156 1.0511 24.5696C0.378092 23.9235 0 23.0473 0 22.1336V6.05706C0 5.14339 0.378092 4.26715 1.0511 3.62109C1.72411 2.97503 2.6369 2.61208 3.58868 2.61208H6.57924V1.46376C6.57924 1.1592 6.70528 0.867119 6.92961 0.651766C7.15395 0.436414 7.45821 0.31543 7.77547 0.31543C8.09273 0.31543 8.39699 0.436414 8.62133 0.651766C8.84567 0.867119 8.9717 1.1592 8.9717 1.46376V2.61208H17.3453V1.46376C17.3453 1.1592 17.4713 0.867119 17.6957 0.651766C17.92 0.436414 18.2242 0.31543 18.5415 0.31543C18.8588 0.31543 19.163 0.436414 19.3874 0.651766C19.6117 0.867119 19.7377 1.1592 19.7377 1.46376V2.61208H22.7283C23.6801 2.61208 24.5929 2.97503 25.2659 3.62109ZM6.57924 4.90873H4.18679C3.7109 4.90873 3.25451 5.09021 2.918 5.41324C2.5815 5.73627 2.39245 6.17439 2.39245 6.63122V9.50203H23.9245V6.63122C23.9245 6.17439 23.7355 5.73627 23.399 5.41324C23.0625 5.09021 22.6061 4.90873 22.1302 4.90873H19.7377V6.05706C19.7377 6.36161 19.6117 6.65369 19.3874 6.86905C19.163 7.0844 18.8588 7.20538 18.5415 7.20538C18.2242 7.20538 17.92 7.0844 17.6957 6.86905C17.4713 6.65369 17.3453 6.36161 17.3453 6.05706V4.90873H8.9717V6.05706C8.9717 6.36161 8.84567 6.65369 8.62133 6.86905C8.39699 7.0844 8.09273 7.20538 7.77547 7.20538C7.45821 7.20538 7.15395 7.0844 6.92961 6.86905C6.70528 6.65369 6.57924 6.36161 6.57924 6.05706V4.90873ZM4.52477 15.3158C5.66029 15.3158 6.58082 14.4321 6.58082 13.3421C6.58082 12.2521 5.66029 11.3684 4.52477 11.3684C3.38924 11.3684 2.46872 12.2521 2.46872 13.3421C2.46872 14.4321 3.38924 15.3158 4.52477 15.3158Z" fill="white" fill-opacity="0.5"/>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 604 B

@ -0,0 +1,3 @@
<svg width="10" height="11" viewBox="0 0 10 11" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3.16969 1.07436C2.55762 1.32817 2.0084 1.70136 1.53745 2.1829C1.06636 2.66459 0.701903 3.22646 0.453611 3.85234C0.213909 4.45703 0.0922852 5.09602 0.0922852 5.75147C0.0922852 6.40678 0.213909 7.04577 0.453611 7.65018C0.701903 8.2762 1.0665 8.83807 1.53745 9.31962C2.0084 9.80144 2.55748 10.1744 3.16969 10.4282C3.7609 10.6736 4.38551 10.7976 5.02636 10.7976C5.6672 10.7976 6.29168 10.6732 6.88289 10.4282C7.49482 10.1744 8.04431 9.80144 8.51512 9.31962C8.98621 8.83807 9.35081 8.27648 9.59896 7.65018C9.83867 7.04577 9.96002 6.40678 9.96002 5.75147C9.96002 5.09602 9.83853 4.45703 9.59896 3.85234C9.35081 3.22646 8.98594 2.66445 8.51512 2.1829C8.04431 1.70136 7.49537 1.32817 6.88289 1.07436C6.29168 0.829334 5.6672 0.705078 5.02636 0.705078C4.38551 0.705078 3.7609 0.829334 3.16969 1.07436ZM1.32543 7.87582C1.08777 7.72325 0.868794 7.54754 0.674905 7.34058C0.378755 6.48822 0.328578 5.56543 0.524785 4.68951C0.617093 4.50333 0.722082 4.32455 0.840842 4.15329C0.87752 4.10044 0.911471 4.04535 0.95074 3.99403L2.06417 4.66789C2.06417 4.67681 2.06417 4.68658 2.06417 4.69648C2.0613 5.30897 2.12212 5.91701 2.24319 6.51625C2.2436 6.51904 2.24401 6.52058 2.24456 6.52309L1.38106 7.9079C1.36224 7.89813 1.34356 7.88753 1.32543 7.87582ZM4.63599 10.2169C4.8281 10.3172 5.02567 10.4018 5.2287 10.4707C4.36629 10.509 3.49529 10.3024 2.72533 9.85053L4.59181 10.1907C4.60613 10.2 4.62072 10.2089 4.63599 10.2169ZM4.62917 9.87229L2.42658 9.47079C2.16888 9.15074 1.93709 8.81213 1.73788 8.45024C1.68716 8.3582 1.63058 8.26881 1.58763 8.17272L2.45031 6.78931C2.4694 6.79419 2.49067 6.79935 2.5148 6.80591C3.05447 6.95359 3.60369 7.0586 4.15672 7.14088C4.18903 7.14548 4.21603 7.14953 4.23907 7.15204L5.27315 8.98074C5.09371 9.23873 4.91223 9.49533 4.7268 9.74915C4.69598 9.7914 4.66326 9.83198 4.62917 9.87229ZM8.29369 9.09328C8.11835 9.27276 7.93223 9.43453 7.73739 9.57873C7.70507 9.3146 7.64931 9.05577 7.57063 8.80293L8.67397 6.69769C8.97789 6.55614 9.27104 6.39562 9.5432 6.19662C9.57878 6.17082 9.60837 6.14195 9.63128 6.11043C9.55138 7.19834 9.10552 8.26309 8.29369 9.09328ZM8.24474 6.36299C8.28578 6.44304 8.32628 6.52392 8.36691 6.60592L7.30121 8.63921C7.29507 8.6406 7.28921 8.642 7.28307 8.64283C6.707 8.75286 6.12628 8.81144 5.54066 8.81423L4.47714 6.93337C4.64267 6.61903 4.8067 6.30344 4.96936 5.98771C5.0798 5.77351 5.18834 5.5579 5.29674 5.34244L7.49782 5.11122C7.76738 5.51565 8.02277 5.92872 8.24474 6.36299ZM7.7982 3.95122C7.69376 4.23334 7.58195 4.51253 7.47082 4.79229L5.3266 5.01751C5.30096 4.98292 5.27437 4.9489 5.24642 4.9164C4.99322 4.62312 4.73839 4.33166 4.48396 4.03936C4.48628 4.03643 4.48859 4.0342 4.49091 4.03155C4.38824 3.92668 4.2853 3.8218 4.18263 3.71665L4.77956 1.87847C4.82074 1.86731 4.86219 1.85797 4.90405 1.85337C5.22856 1.81962 5.55348 1.78141 5.87881 1.76216C6.07802 1.75073 6.27831 1.74417 6.48093 1.75882L7.95786 3.46145C7.90701 3.62573 7.85737 3.79043 7.7982 3.95122ZM8.29369 2.40938C8.7011 2.82636 9.01662 3.30219 9.23968 3.81051C8.96371 3.61624 8.66865 3.45643 8.35846 3.32617C8.31019 3.30581 8.2607 3.28782 8.21038 3.27011L6.75663 1.59426C6.76672 1.52188 6.77203 1.44936 6.77422 1.37628C7.32725 1.60653 7.84565 1.95127 8.29369 2.40938ZM3.54656 1.28829C3.55228 1.29261 3.55501 1.29624 3.55828 1.29721C3.89057 1.41464 4.19285 1.58756 4.47782 1.7927L3.92015 3.5104C3.91729 3.51123 3.91456 3.51207 3.91184 3.51332C3.79771 3.56158 3.68141 3.60481 3.56905 3.6571C3.10615 3.87229 2.65483 4.11062 2.2297 4.39637L1.12922 3.73046C1.13086 3.69532 1.13672 3.65962 1.14845 3.62782C1.22235 3.42644 1.29502 3.22395 1.3786 3.02662C1.44296 2.87461 1.51632 2.72776 1.59635 2.58426C1.64871 2.52513 1.70298 2.46656 1.75888 2.40938C2.28151 1.87498 2.89917 1.49552 3.55678 1.27113C3.55337 1.27657 3.54983 1.28229 3.54656 1.28829Z" fill="#5CDD86"/>
</svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 873 B

@ -0,0 +1,16 @@
<svg width="29" height="28" viewBox="0 0 29 28" fill="none" xmlns="http://www.w3.org/2000/svg">
<g filter="url(#filter0_d)">
<path d="M19.1605 15C20.8027 15 22.1898 16.0543 22.6354 17.5002L24.8569 17.5C25.4289 17.5 25.8926 17.9477 25.8926 18.5C25.8926 19.0523 25.4289 19.5 24.8569 19.5L22.6351 19.5008C22.1892 20.9462 20.8023 22 19.1605 22C17.5187 22 16.1318 20.9462 15.6859 19.5008L4.14265 19.5C3.57064 19.5 3.10693 19.0523 3.10693 18.5C3.10693 17.9477 3.57064 17.5 4.14265 17.5L15.6856 17.5002C16.1312 16.0543 17.5183 15 19.1605 15ZM19.1605 16.75C18.1595 16.75 17.348 17.5335 17.348 18.5C17.348 19.4665 18.1595 20.25 19.1605 20.25C20.1615 20.25 20.973 19.4665 20.973 18.5C20.973 17.5335 20.1615 16.75 19.1605 16.75ZM10.8748 6C12.517 6 13.9041 7.05433 14.3497 8.50016L24.8569 8.5C25.4289 8.5 25.8926 8.94772 25.8926 9.5C25.8926 10.0523 25.4289 10.5 24.8569 10.5L14.3494 10.5008C13.9035 11.9462 12.5166 13 10.8748 13C9.23297 13 7.84608 11.9462 7.40017 10.5008L4.14265 10.5C3.57064 10.5 3.10693 10.0523 3.10693 9.5C3.10693 8.94772 3.57064 8.5 4.14265 8.5L7.39986 8.50016C7.84544 7.05433 9.23259 6 10.8748 6ZM10.8748 7.75C9.87377 7.75 9.06229 8.5335 9.06229 9.5C9.06229 10.4665 9.87377 11.25 10.8748 11.25C11.8758 11.25 12.6873 10.4665 12.6873 9.5C12.6873 8.5335 11.8758 7.75 10.8748 7.75Z" fill="#B7B7B7"/>
</g>
<defs>
<filter id="filter0_d" x="2.10693" y="6" width="24.7857" height="18" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/>
<feOffset dy="1"/>
<feGaussianBlur stdDeviation="0.5"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
</filter>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

@ -0,0 +1,4 @@
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<clip-path d="M0,0h40v40h-40z"/>
<path d="M39.349,1.675 L34.761,0.078a0.728,0.728 0,0 0,-1 0.4L24.188,25.229c-0.2,0.4 -0.4,0.6 -0.8,0.6H4.44c-0.4,0 -0.6,0.2 -0.8,0.6L0.052,39c-0.2,0.4 0.2,1 0.8,1H25.385c0.4,0 0.6,-0.2 0.8,-0.6L39.947,2.673A0.763,0.763 0,0 0,39.349 1.675ZM12.02,36.008H5.039l1.8,-5.988h7.181Z" fill="#5eb2ff"/>
</svg>

After

Width:  |  Height:  |  Size: 430 B

@ -1,10 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="174" height="40" viewBox="0 0 174 40" fill="none">
<path d="M173.496 4.56953C173.496 5.88584 173.04 6.98276 172.014 7.8603C171.102 8.73784 169.848 9.1766 168.481 9.1766C167.797 9.1766 167.113 9.06691 166.543 8.84753C165.973 8.62814 165.403 8.29907 164.947 7.8603C164.491 7.42153 164.149 6.98276 163.921 6.4343C163.693 5.88584 163.465 5.22768 163.465 4.56953C163.465 3.91137 163.579 3.36291 163.921 2.81445C164.149 2.26599 164.605 1.71753 164.947 1.38845C165.403 0.949682 165.973 0.620605 166.543 0.401221C167.113 0.181836 167.797 0.0721436 168.481 0.0721436C169.848 0.0721436 171.102 0.510913 172.014 1.38845C173.04 2.1563 173.496 3.25322 173.496 4.56953Z" fill="#999999" />
<path d="M10.6013 39.1227C10.4873 39.342 10.0313 39.342 9.46138 39.342H1.36791C0.45597 39.342 0 38.9033 0 38.1354V1.82727C0 1.05942 0.45597 0.730347 1.36791 0.730347H9.57537C10.2593 0.730347 10.6013 0.840039 10.7153 0.949731C10.8293 1.05942 10.8293 1.3885 10.8293 1.82727V38.1354C10.8293 38.5742 10.8293 38.9033 10.6013 39.1227Z" fill="#999999" />
<path d="M30.2077 17.5131C29.8657 17.5131 29.4097 17.5131 28.7258 17.5131C28.1558 17.5131 27.5859 17.6228 27.0159 17.7325V38.2449C27.0159 38.6837 26.9019 39.0128 26.7879 39.1225C26.6739 39.2322 26.218 39.3419 25.648 39.3419H18.0105C17.0985 39.3419 16.6426 39.0128 16.6426 38.2449V14.5514C16.6426 13.3448 16.8706 12.4672 17.2125 11.6994C17.5545 10.9315 18.4665 10.4928 19.8344 10.1637C20.1763 10.054 20.7463 10.054 21.5443 9.94431C22.3422 9.83462 23.1402 9.72493 24.0521 9.72493C24.964 9.72493 25.876 9.61523 26.7879 9.61523C27.6999 9.61523 28.4978 9.61523 29.1818 9.61523C31.9176 9.61523 34.4254 9.83462 36.5913 10.3831C38.7571 10.9315 40.467 11.6994 41.8349 12.906C43.2028 14.1126 44.2288 15.5386 45.0267 17.4034C45.7107 19.2682 46.0527 21.5717 46.0527 24.2043V38.3546C46.0527 38.7934 45.9387 39.1225 45.8247 39.2322C45.7107 39.3419 45.2547 39.4515 44.6847 39.4515H36.9333C36.0213 39.4515 35.5653 39.1225 35.5653 38.3546V23.1074C35.5653 21.2426 35.2234 19.8166 34.4254 18.8294C33.7415 17.9519 32.3735 17.5131 30.2077 17.5131Z" fill="#999999" />
<path d="M50.8406 13.5642C50.6126 12.0285 50.7266 10.4928 51.1825 8.95713C51.6385 7.42144 52.3225 6.10513 53.3484 4.89851C54.3743 3.6919 55.7422 2.70467 57.5661 1.82713C59.39 0.94959 61.4419 0.401129 63.9497 0.181744C66.2295 -0.0376405 68.6234 -0.0376405 71.1312 0.0720519C73.5251 0.291437 75.5769 0.730206 77.4008 1.38836C78.0848 1.60774 78.4268 1.82713 78.5407 2.15621C78.6547 2.37559 78.5407 2.92405 78.3128 3.6919L77.2868 8.40867C77.0588 9.17651 76.8309 9.61528 76.6029 9.72498C76.3749 9.83467 75.9189 9.83467 75.235 9.61528C73.5251 9.3959 71.8152 9.17652 70.1053 9.06682C68.3954 9.06682 66.6855 9.06682 65.2036 9.17651C63.8357 9.28621 63.0378 9.61528 62.5818 9.94436C62.1258 10.3831 62.0118 10.8219 62.1258 11.3704C62.1258 11.5897 62.2398 11.8091 62.3538 12.0285C62.4678 12.2479 62.6958 12.4673 63.0378 12.6867C63.3797 12.9061 63.8357 13.1254 64.4057 13.4545C64.9756 13.6739 65.7736 13.8933 66.7995 14.1127C69.1934 14.7708 71.3592 15.3193 73.2971 15.9774C75.235 16.6356 76.8309 17.4034 78.1988 18.281C79.5667 19.1585 80.7066 20.2554 81.5045 21.5717C82.3025 22.7784 82.8725 24.4237 83.1004 26.1788C83.5564 30.1277 82.5305 33.1991 80.0226 35.5027C77.5148 37.6965 73.8671 39.1225 68.8514 39.671C66.2296 39.8904 63.4937 40.0001 60.6439 39.7807C57.7941 39.5613 55.0583 38.9031 52.6644 37.8062C52.2085 37.5868 51.9805 37.3674 51.9805 37.1481C51.8665 36.9287 51.9805 36.4899 52.0945 35.9414L53.8044 30.4568C54.0323 29.7987 54.2603 29.4696 54.4883 29.3599C54.7163 29.2502 55.1723 29.2502 55.7422 29.4696C56.3122 29.689 57.1101 29.7987 58.0221 29.9084C58.934 30.1277 59.96 30.2374 60.9859 30.3471C62.0118 30.4568 63.1518 30.5665 64.2917 30.5665C65.4316 30.5665 66.5715 30.5665 67.5975 30.4568C68.5094 30.3471 69.1934 30.2374 69.7633 30.0181C70.2193 29.7987 70.6753 29.5793 70.9032 29.2502C71.1312 29.0308 71.3592 28.7017 71.3592 28.3727C71.3592 28.0436 71.4732 27.8242 71.3592 27.6048C71.3592 27.2757 71.2452 27.0564 71.1312 26.7273C71.0172 26.3982 70.7892 26.1788 70.4473 25.9594C70.1053 25.7401 69.6493 25.5207 68.9654 25.1916C68.2814 24.9722 67.4835 24.6431 66.4575 24.4237C64.4057 23.985 62.4678 23.4365 60.6439 22.7784C58.82 22.2299 57.2241 21.4621 55.8562 20.6942C54.4883 19.9264 53.3484 18.8294 52.5504 17.7325C51.6385 16.6356 51.0685 15.2096 50.8406 13.5642Z" fill="#999999" />
<path d="M106.127 38.3546C106.127 38.574 105.899 38.6836 105.443 38.7933C103.847 39.2321 102.251 39.5612 100.769 39.6709C99.2873 39.7806 97.8054 39.8903 96.5515 39.8903C93.0177 39.8903 90.5098 39.1224 89.0279 37.6964C87.4321 36.2704 86.7481 34.296 86.7481 31.773V17.513H82.7584C82.3024 17.513 81.9604 17.4033 81.9604 17.184C81.8464 16.9646 81.7324 16.6355 81.7324 16.4161V12.4672C81.7324 12.1381 81.7324 11.809 81.8464 11.6993C81.9604 11.5896 82.1884 11.48 82.6444 11.3703L86.6341 10.2733V5.22749C86.6341 4.67903 86.7481 4.34996 86.9761 4.13057C87.2041 3.91119 87.546 3.80149 88.002 3.6918L95.6395 1.49796C96.0955 1.38826 96.4375 1.38826 96.6655 1.60765C96.7794 1.60765 96.8934 1.93672 96.8934 2.48519V10.383H103.277C103.733 10.383 104.075 10.4927 104.075 10.6024C104.075 10.7121 104.189 11.0412 104.189 11.3703V16.3064C104.189 16.7452 104.189 16.9646 104.189 17.184C104.189 17.4033 103.847 17.4033 103.391 17.4033H96.8934V29.0307C96.8934 29.9083 97.1214 30.5664 97.6914 30.8955C98.2613 31.2246 98.9453 31.444 100.085 31.444C100.655 31.444 101.453 31.444 102.365 31.3343C103.277 31.2246 103.961 31.1149 104.417 31.1149C104.759 31.1149 104.987 31.1149 105.101 31.1149C105.215 31.2246 105.329 31.3343 105.329 31.6633L106.127 37.6964C106.127 38.0255 106.127 38.2449 106.127 38.3546Z" fill="#999999" />
<path d="M135.766 35.2833C135.766 35.8318 135.766 36.2705 135.538 36.5996C135.31 36.9287 134.968 37.3675 134.284 37.6965C133.372 38.1353 132.46 38.4644 131.434 38.6838C130.408 39.0128 129.268 39.2322 128.242 39.4516C127.102 39.671 125.962 39.7807 124.823 39.8904C123.683 40.0001 122.657 40.0001 121.631 40.0001C119.009 40.0001 116.729 39.7807 115.019 39.3419C113.195 38.9032 111.827 38.245 110.687 37.3675C109.662 36.5996 108.864 35.5027 108.408 34.4058C107.952 33.3088 107.724 31.9925 107.724 30.6762C107.724 27.3855 108.75 24.9722 110.915 23.3268C113.081 21.6815 115.817 20.8039 119.351 20.8039H125.62V20.0361C125.62 19.8167 125.62 19.4876 125.506 19.1585C125.392 18.8295 125.278 18.5004 124.937 18.1713C124.709 17.8422 124.253 17.6228 123.683 17.4035C123.113 17.1841 122.429 17.1841 121.631 17.1841C121.061 17.1841 120.491 17.1841 119.807 17.2938C119.123 17.2938 118.439 17.4035 117.641 17.5132C116.843 17.6228 116.159 17.7325 115.361 17.7325C114.563 17.8422 113.879 17.9519 113.309 18.1713C112.739 18.281 112.397 18.281 112.283 18.1713C112.055 18.0616 111.941 17.7325 111.827 17.4035L110.801 12.6867C110.687 12.1382 110.687 11.8092 110.801 11.6995C110.915 11.5898 111.143 11.3704 111.485 11.2607C113.309 10.7122 115.133 10.2735 117.071 9.94439C119.009 9.725 120.947 9.50562 123.113 9.50562C127.444 9.50562 130.75 10.3832 132.802 12.0285C134.854 13.6739 135.994 16.3065 135.994 19.9264L135.766 35.2833ZM125.506 26.7273H122.087C121.631 26.7273 121.289 26.7273 120.833 26.837C120.377 26.9467 120.035 27.0564 119.693 27.2758C119.351 27.4952 119.009 27.8242 118.895 28.1533C118.667 28.5921 118.553 29.0308 118.553 29.689C118.553 30.5665 118.895 31.2247 119.579 31.6635C120.263 32.1022 121.175 32.3216 122.201 32.3216C122.429 32.3216 122.999 32.3216 123.683 32.2119C124.367 32.1022 125.05 31.9925 125.506 31.7732V26.7273Z" fill="#999999" />
<path d="M161.299 38.3546C161.299 38.574 161.071 38.6836 160.615 38.7933C159.019 39.2321 157.423 39.5612 155.941 39.6709C154.459 39.7806 152.977 39.8903 151.723 39.8903C148.19 39.8903 145.682 39.1224 144.2 37.6964C142.604 36.2704 141.92 34.296 141.92 31.773V17.513H137.93C137.474 17.513 137.132 17.4033 137.132 17.184C137.018 16.9646 136.904 16.6355 136.904 16.4161V12.4672C136.904 12.1381 136.904 11.809 137.018 11.6993C137.132 11.5896 137.36 11.48 137.816 11.3703L141.92 10.383V5.22749C141.92 4.67903 142.034 4.34996 142.262 4.13057C142.49 3.91119 142.832 3.80149 143.288 3.6918L150.925 1.49796C151.381 1.38826 151.723 1.38826 151.951 1.60765C152.179 1.82703 152.293 2.04642 152.293 2.59488V10.4927H158.677C159.133 10.4927 159.475 10.6024 159.475 10.7121C159.475 10.8218 159.589 11.1509 159.589 11.48V16.4161C159.589 16.8549 159.589 17.0743 159.589 17.2936C159.589 17.513 159.247 17.513 158.791 17.513H152.407V29.1404C152.407 30.018 152.635 30.6761 153.205 31.0052C153.661 31.3343 154.459 31.5536 155.599 31.5536C156.169 31.5536 156.967 31.5536 157.879 31.444C158.791 31.3343 159.475 31.2246 159.931 31.2246C160.273 31.2246 160.501 31.2246 160.615 31.2246C160.729 31.3343 160.843 31.444 160.843 31.773L161.641 37.8061C161.299 38.0255 161.299 38.2449 161.299 38.3546Z" fill="#999999" />
<svg width="235" height="54" viewBox="0 0 235 54" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M234.859 6.16912C234.859 7.94614 234.243 9.42698 232.858 10.6117C231.627 11.7963 229.934 12.3887 228.088 12.3887C227.164 12.3887 226.241 12.2406 225.471 11.9444C224.702 11.6482 223.933 11.204 223.317 10.6117C222.701 10.0193 222.24 9.42698 221.932 8.68656C221.624 7.94614 221.316 7.05763 221.316 6.16912C221.316 5.28061 221.47 4.54019 221.932 3.79977C222.24 3.05935 222.855 2.31892 223.317 1.87467C223.933 1.28233 224.702 0.838079 225.471 0.54191C226.241 0.245741 227.164 0.0976562 228.088 0.0976562C229.934 0.0976562 231.627 0.689994 232.858 1.87467C234.243 2.91126 234.859 4.39211 234.859 6.16912Z" fill="white"/>
<path d="M14.9504 52.8159C14.7965 53.1121 14.181 53.1121 13.4115 53.1121H2.48535C1.25423 53.1121 0.638672 52.5197 0.638672 51.4832V2.46717C0.638672 1.43058 1.25423 0.986328 2.48535 0.986328H13.5654C14.4888 0.986328 14.9504 1.13441 15.1043 1.2825C15.2582 1.43058 15.2582 1.87484 15.2582 2.46717V51.4832C15.2582 52.0755 15.2582 52.5197 14.9504 52.8159Z" fill="white"/>
<path d="M41.4193 23.6426C40.9577 23.6426 40.3421 23.6426 39.4188 23.6426C38.6493 23.6426 37.8799 23.7906 37.1104 23.9387V51.6305C37.1104 52.2229 36.9565 52.6671 36.8026 52.8152C36.6488 52.9633 36.0332 53.1114 35.2637 53.1114H24.9531C23.722 53.1114 23.1064 52.6671 23.1064 51.6305V19.6443C23.1064 18.0153 23.4142 16.8307 23.8759 15.7941C24.3376 14.7575 25.5687 14.1651 27.4154 13.7209C27.877 13.5728 28.6465 13.5728 29.7237 13.4247C30.8009 13.2766 31.8782 13.1286 33.1093 13.1286C34.3404 13.1286 35.5715 12.9805 36.8026 12.9805C38.0338 12.9805 39.111 12.9805 40.0343 12.9805C43.7277 12.9805 47.1133 13.2766 50.0372 14.0171C52.9611 14.7575 55.2694 15.7941 57.1161 17.423C58.9628 19.0519 60.3478 20.977 61.425 23.4945C62.3484 26.0119 62.81 29.1217 62.81 32.6757V51.7786C62.81 52.371 62.6561 52.8152 62.5022 52.9633C62.3484 53.1114 61.7328 53.2595 60.9633 53.2595H50.4988C49.2677 53.2595 48.6522 52.8152 48.6522 51.7786V31.1949C48.6522 28.6774 48.1905 26.7523 47.1133 25.4196C46.1899 24.2349 44.3432 23.6426 41.4193 23.6426Z" fill="white"/>
<path d="M69.273 18.3117C68.9652 16.2385 69.1191 14.1653 69.7347 12.0921C70.3503 10.0189 71.2736 8.24192 72.6586 6.61299C74.0436 4.98406 75.8903 3.6513 78.3525 2.46662C80.8148 1.28195 83.5848 0.541524 86.9704 0.245355C90.0482 -0.0508146 93.2798 -0.0508146 96.6654 0.09727C99.8971 0.393439 102.667 0.985777 105.129 1.87428C106.053 2.17045 106.514 2.46662 106.668 2.91088C106.822 3.20705 106.668 3.94747 106.36 4.98406L104.975 11.3517C104.668 12.3883 104.36 12.9806 104.052 13.1287C103.744 13.2768 103.129 13.2768 102.205 12.9806C99.8971 12.6845 97.5888 12.3883 95.2804 12.2402C92.9721 12.2402 90.6637 12.2402 88.6632 12.3883C86.8165 12.5364 85.7392 12.9806 85.1237 13.4249C84.5081 14.0172 84.3542 14.6096 84.5081 15.35C84.5081 15.6461 84.662 15.9423 84.8159 16.2385C84.9698 16.5347 85.2776 16.8308 85.7392 17.127C86.2009 17.4232 86.8165 17.7193 87.5859 18.1636C88.3554 18.4598 89.4326 18.7559 90.8176 19.0521C94.0493 19.9406 96.9732 20.681 99.5893 21.5695C102.205 22.458 104.36 23.4946 106.207 24.6793C108.053 25.864 109.592 27.3448 110.669 29.1218C111.747 30.7508 112.516 32.972 112.824 35.3414C113.439 40.6724 112.054 44.8188 108.669 47.9286C105.283 50.8903 100.359 52.8154 93.5876 53.5558C90.0482 53.852 86.3548 54 82.5076 53.7039C78.6603 53.4077 74.967 52.5192 71.7353 51.0384C71.1197 50.7422 70.8119 50.446 70.8119 50.1498C70.658 49.8537 70.8119 49.2613 70.9658 48.5209L73.2742 41.1167C73.5819 40.2282 73.8897 39.7839 74.1975 39.6358C74.5053 39.4878 75.1208 39.4878 75.8903 39.7839C76.6597 40.0801 77.737 40.2282 78.9681 40.3763C80.1992 40.6724 81.5842 40.8205 82.9692 40.9686C84.3542 41.1167 85.8931 41.2648 87.432 41.2648C88.9709 41.2648 90.5098 41.2648 91.8948 41.1167C93.126 40.9686 94.0493 40.8205 94.8187 40.5243C95.4343 40.2282 96.0499 39.932 96.3576 39.4878C96.6654 39.1916 96.9732 38.7473 96.9732 38.3031C96.9732 37.8588 97.1271 37.5627 96.9732 37.2665C96.9732 36.8222 96.8193 36.5261 96.6654 36.0818C96.5115 35.6376 96.2038 35.3414 95.7421 35.0452C95.2804 34.7491 94.6649 34.4529 93.7415 34.0086C92.8182 33.7125 91.7409 33.2682 90.3559 32.972C87.5859 32.3797 84.9698 31.6393 82.5076 30.7508C80.0453 30.0103 77.8909 28.9738 76.0442 27.9372C74.1975 26.9006 72.6586 25.4197 71.5814 23.9389C70.3503 22.458 69.5808 20.5329 69.273 18.3117Z" fill="white"/>
<path d="M143.91 51.7785C143.91 52.0746 143.602 52.2227 142.987 52.3708C140.832 52.9632 138.678 53.4074 136.677 53.5555C134.677 53.7036 132.676 53.8517 130.983 53.8517C126.213 53.8517 122.827 52.8151 120.826 50.89C118.672 48.9649 117.749 46.2993 117.749 42.8934V23.6424H112.363C111.747 23.6424 111.285 23.4943 111.285 23.1982C111.131 22.902 110.978 22.4577 110.978 22.1616V16.8305C110.978 16.3863 110.978 15.942 111.131 15.7939C111.285 15.6459 111.593 15.4978 112.209 15.3497L117.595 13.8688V7.05695C117.595 6.31653 117.749 5.87227 118.056 5.5761C118.364 5.27993 118.826 5.13185 119.441 4.98377L129.752 2.02207C130.368 1.87399 130.829 1.87399 131.137 2.17016C131.291 2.17016 131.445 2.61441 131.445 3.35484V14.0169H140.063C140.678 14.0169 141.14 14.165 141.14 14.3131C141.14 14.4612 141.294 14.9054 141.294 15.3497V22.0135C141.294 22.6058 141.294 22.902 141.294 23.1982C141.294 23.4943 140.832 23.4943 140.217 23.4943H131.445V39.1913C131.445 40.376 131.753 41.2645 132.522 41.7087C133.292 42.153 134.215 42.4492 135.754 42.4492C136.523 42.4492 137.6 42.4492 138.832 42.3011C140.063 42.153 140.986 42.0049 141.602 42.0049C142.063 42.0049 142.371 42.0049 142.525 42.0049C142.679 42.153 142.833 42.3011 142.833 42.7453L143.91 50.89C143.91 51.3342 143.91 51.6304 143.91 51.7785Z" fill="white"/>
<path d="M183.922 47.6329C183.922 48.3733 183.922 48.9656 183.615 49.4099C183.307 49.8541 182.845 50.4465 181.922 50.8907C180.691 51.4831 179.46 51.9273 178.075 52.2235C176.69 52.6677 175.151 52.9639 173.766 53.2601C172.227 53.5563 170.688 53.7043 169.149 53.8524C167.61 54.0005 166.225 54.0005 164.84 54.0005C161.301 54.0005 158.223 53.7043 155.914 53.112C153.452 52.5197 151.605 51.6312 150.067 50.4465C148.682 49.4099 147.604 47.929 146.989 46.4482C146.373 44.9674 146.065 43.1903 146.065 41.4133C146.065 36.9708 147.45 33.7129 150.374 31.4917C153.298 29.2704 156.992 28.0857 161.762 28.0857H170.226V27.0491C170.226 26.753 170.226 26.3087 170.072 25.8644C169.918 25.4202 169.764 24.9759 169.303 24.5317C168.995 24.0874 168.379 23.7913 167.61 23.4951C166.841 23.1989 165.917 23.1989 164.84 23.1989C164.071 23.1989 163.301 23.1989 162.378 23.347C161.454 23.347 160.531 23.4951 159.454 23.6432C158.377 23.7913 157.453 23.9393 156.376 23.9393C155.299 24.0874 154.375 24.2355 153.606 24.5317C152.837 24.6798 152.375 24.6798 152.221 24.5317C151.913 24.3836 151.759 23.9393 151.605 23.4951L150.22 17.1275C150.067 16.387 150.067 15.9428 150.22 15.7947C150.374 15.6466 150.682 15.3504 151.144 15.2024C153.606 14.4619 156.068 13.8696 158.684 13.4253C161.301 13.1292 163.917 12.833 166.841 12.833C172.688 12.833 177.151 14.0177 179.921 16.239C182.691 18.4602 184.23 22.0143 184.23 26.901L183.922 47.6329ZM170.072 36.0823H165.456C164.84 36.0823 164.378 36.0823 163.763 36.2304C163.147 36.3784 162.686 36.5265 162.224 36.8227C161.762 37.1189 161.301 37.5631 161.147 38.0074C160.839 38.5997 160.685 39.1921 160.685 40.0806C160.685 41.2652 161.147 42.1537 162.07 42.7461C162.993 43.3384 164.224 43.6346 165.609 43.6346C165.917 43.6346 166.687 43.6346 167.61 43.4865C168.533 43.3384 169.457 43.1903 170.072 42.8942V36.0823Z" fill="white"/>
<path d="M218.391 51.7785C218.391 52.0746 218.084 52.2227 217.468 52.3708C215.314 52.9632 213.159 53.4074 211.159 53.5555C209.158 53.7036 207.157 53.8517 205.465 53.8517C200.694 53.8517 197.308 52.8151 195.308 50.89C193.153 48.9649 192.23 46.2993 192.23 42.8934V23.6424H186.844C186.228 23.6424 185.767 23.4943 185.767 23.1982C185.613 22.902 185.459 22.4577 185.459 22.1616V16.8305C185.459 16.3863 185.459 15.942 185.613 15.7939C185.767 15.6459 186.075 15.4978 186.69 15.3497L192.23 14.0169V7.05695C192.23 6.31653 192.384 5.87227 192.692 5.5761C193 5.27993 193.461 5.13185 194.077 4.98377L204.387 2.02207C205.003 1.87399 205.465 1.87399 205.772 2.17016C206.08 2.46633 206.234 2.7625 206.234 3.50292V14.165H214.852C215.467 14.165 215.929 14.3131 215.929 14.4612C215.929 14.6093 216.083 15.0535 216.083 15.4978V22.1616C216.083 22.7539 216.083 23.0501 216.083 23.3462C216.083 23.6424 215.621 23.6424 215.006 23.6424H206.388V39.3394C206.388 40.5241 206.696 41.4126 207.465 41.8568C208.081 42.3011 209.158 42.5972 210.697 42.5972C211.466 42.5972 212.544 42.5972 213.775 42.4492C215.006 42.3011 215.929 42.153 216.545 42.153C217.006 42.153 217.314 42.153 217.468 42.153C217.622 42.3011 217.776 42.4492 217.776 42.8934L218.853 51.038C218.391 51.3342 218.391 51.6304 218.391 51.7785Z" fill="white"/>
</svg>

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

@ -1,5 +1,4 @@
<svg width="26" height="20" viewBox="0 0 26 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M2 2H12V4.54543H14V2C14 0.895431 13.1046 0 12 0H2C0.895431 0 0 0.895431 0 2V18C0 19.1046 0.89543 20 2 20H12C13.1046 20 14 19.1046 14 18V15.4545H12V18H2L2 2Z" fill="white"/>
<rect x="5" y="9" width="10" height="2" rx="0.5" fill="white" stroke="#999999" stroke-width="0.05"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 9.625C12 9.34886 12.2239 9.125 12.5 9.125H21.4679C21.9133 9.125 22.1364 8.58643 21.8214 8.27145L18.1286 4.57855C17.9333 4.38329 17.9333 4.06671 18.1286 3.87145L18.6464 3.35355C18.8417 3.15829 19.1583 3.15829 19.3536 3.35355L25.6464 9.64645C25.8417 9.84171 25.8417 10.1583 25.6464 10.3536L19.3536 16.6464C19.1583 16.8417 18.8417 16.8417 18.6464 16.6464L18.1286 16.1286C17.9333 15.9333 17.9333 15.6167 18.1286 15.4214L21.8214 11.7286C22.1364 11.4136 21.9133 10.875 21.4679 10.875H12.5C12.2239 10.875 12 10.6511 12 10.375V9.625Z" fill="white" stroke="white" stroke-width="0.2"/>
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.9602 21.967H2.99002C2.43984 21.967 1.99336 21.5205 1.99336 20.9703V3.0301C1.99336 2.47993 2.43989 2.03345 2.99002 2.03345H11.9602C12.5113 2.03345 12.9568 1.58795 12.9568 1.03679C12.9568 0.485633 12.5113 0.0400391 11.9602 0.0400391H2.99002C1.34152 0.0400391 0 1.3816 0 3.0301V20.9703C0 22.6188 1.34152 23.9603 2.99002 23.9603H11.9602C12.5113 23.9603 12.9568 23.5148 12.9568 22.9636C12.9568 22.4125 12.5113 21.967 11.9602 21.967Z" fill="white"/>
<path d="M23.7027 11.2905L17.6429 5.31037C17.2522 4.92366 16.6203 4.92867 16.2336 5.32036C15.8469 5.71205 15.8509 6.34294 16.2436 6.72966L20.5741 11.0034H8.9698C8.41864 11.0034 7.97314 11.4489 7.97314 12C7.97314 12.5512 8.41864 12.9968 8.9698 12.9968H20.5741L16.2436 17.2705C15.8509 17.6572 15.8479 18.2881 16.2336 18.6798C16.4289 18.8771 16.6861 18.9768 16.9432 18.9768C17.1964 18.9768 17.4495 18.8811 17.6429 18.6897L23.7027 12.7096C23.8921 12.5223 23.9997 12.2671 23.9997 12C23.9997 11.733 23.8931 11.4788 23.7027 11.2905Z" fill="white"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -0,0 +1,17 @@
<svg width="57" height="43" viewBox="0 0 57 43" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M21.857 3.09215C23.597 2.99215 25.335 3.00015 27.075 3.00015C27.087 3.00015 35.892 3.00015 35.892 3.00015C37.666 3.00015 39.404 2.99215 41.143 3.09215C42.724 3.18215 44.264 3.37415 45.797 3.80315C49.024 4.70515 51.842 6.58915 53.879 9.26015C55.904 11.9142 57 15.1632 57 18.4992C57 21.8392 55.904 25.0862 53.879 27.7402C51.842 30.4102 49.024 32.2952 45.797 33.1972C44.264 33.6262 42.724 33.8172 41.143 33.9082C39.404 34.0082 37.666 33.9992 35.926 33.9992C35.914 33.9992 27.107 34.0002 27.107 34.0002C25.335 33.9992 23.597 34.0082 21.857 33.9082C20.277 33.8172 18.737 33.6262 17.204 33.1972C13.977 32.2952 11.159 30.4102 9.122 27.7402C7.097 25.0862 6 21.8392 6 18.5002C6 15.1632 7.097 11.9142 9.122 9.26015C11.159 6.58915 13.977 4.70515 17.204 3.80315C18.737 3.37415 20.277 3.18215 21.857 3.09215Z" fill="#3F3F3F"/>
<g filter="url(#filter0_d)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M21.5 32C28.9558 32 35 25.9558 35 18.5C35 11.0442 28.9558 5 21.5 5C14.0442 5 8 11.0442 8 18.5C8 25.9558 14.0442 32 21.5 32Z" fill="white"/>
</g>
<defs>
<filter id="filter0_d" x="0" y="0" width="43" height="43" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="3"/>
<feGaussianBlur stdDeviation="4"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
</filter>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

@ -0,0 +1,17 @@
<svg width="57" height="43" viewBox="0 0 57 43" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M15.857 3.09215C17.597 2.99215 19.335 3.00015 21.075 3.00015C21.087 3.00015 29.892 3.00015 29.892 3.00015C31.666 3.00015 33.404 2.99215 35.143 3.09215C36.724 3.18215 38.264 3.37415 39.797 3.80315C43.024 4.70515 45.842 6.58915 47.879 9.26015C49.904 11.9142 51 15.1632 51 18.4992C51 21.8392 49.904 25.0862 47.879 27.7402C45.842 30.4102 43.024 32.2952 39.797 33.1972C38.264 33.6262 36.724 33.8172 35.143 33.9082C33.404 34.0082 31.666 33.9992 29.926 33.9992C29.914 33.9992 21.107 34.0002 21.107 34.0002C19.335 33.9992 17.597 34.0082 15.857 33.9082C14.277 33.8172 12.737 33.6262 11.204 33.1972C7.977 32.2952 5.159 30.4102 3.122 27.7402C1.097 25.0862 0 21.8392 0 18.5002C0 15.1632 1.097 11.9142 3.122 9.26015C5.159 6.58915 7.977 4.70515 11.204 3.80315C12.737 3.37415 14.277 3.18215 15.857 3.09215Z" fill="#294FC4"/>
<g filter="url(#filter0_d)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M35.5 32C42.9558 32 49 25.9558 49 18.5C49 11.0442 42.9558 5 35.5 5C28.0442 5 22 11.0442 22 18.5C22 25.9558 28.0442 32 35.5 32Z" fill="white"/>
</g>
<defs>
<filter id="filter0_d" x="14" y="0" width="43" height="43" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="3"/>
<feGaussianBlur stdDeviation="4"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
</filter>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

@ -1,25 +1,22 @@
<svg width="30" height="20" viewBox="0 0 30 20" fill="none"
xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M18 16H23C26.866 16 30 12.866 30 9C30 5.13401 26.866 2 23 2H18V3H23C26.3137 3 29 5.68629 29 9C29 12.3137 26.3137 15 23 15H18V16Z" fill="#656565"/>
<rect x="16" y="2" width="5" height="1" rx="0.5" fill="#656565"/>
<rect x="16" y="15" width="5" height="1" rx="0.5" fill="#656565"/>
<g filter="url(#filter0_d)">
<rect x="2" y="1" width="16" height="16" rx="8" fill="#999999"/>
<rect x="2" y="1" width="16" height="16" rx="8" fill="url(#paint0_radial)" fill-opacity="0.25"/>
</g>
<defs>
<filter id="filter0_d" x="0" y="0" width="20" height="20" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/>
<feOffset dy="1"/>
<feGaussianBlur stdDeviation="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
</filter>
<radialGradient id="paint0_radial" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(10 6.5) rotate(90) scale(10.5)">
<stop stop-color="white"/>
<stop offset="1"/>
</radialGradient>
</defs>
<svg width="100%" height="100%" viewBox="0 0 38 23" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M31 18H11C7.1 18 4 14.9 4 11C4 7.1 7.1 4 11 4H31C34.9 4 38 7.1 38 11C38 14.9 34.9 18 31 18Z" fill="#B8C1CC" fill-opacity="0.3"/>
<g filter="url(#filter0_dd)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M11 21C16.5228 21 21 16.5228 21 11C21 5.47715 16.5228 1 11 1C5.47715 1 1 5.47715 1 11C1 16.5228 5.47715 21 11 21Z" fill="#B8C1CC"/>
</g>
<defs>
<filter id="filter0_dd" x="0" y="0" width="22" height="23" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/>
<feOffset dy="1"/>
<feGaussianBlur stdDeviation="0.5"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.237602 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/>
<feOffset/>
<feGaussianBlur stdDeviation="0.5"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.12 0"/>
<feBlend mode="normal" in2="effect1_dropShadow" result="effect2_dropShadow"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect2_dropShadow" result="shape"/>
</filter>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

@ -1,25 +1,22 @@
<svg width="30" height="20" viewBox="0 0 30 20" fill="none"
xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 2L7 2C3.13401 2 -9.49935e-07 5.13401 -6.11959e-07 9C-2.73984e-07 12.866 3.13401 16 7 16L12 16L12 15L7 15C3.68629 15 1 12.3137 0.999999 9C0.999999 5.68629 3.68629 3 7 3L12 3L12 2Z" fill="#656565"/>
<rect x="14" y="16" width="5" height="1" rx="0.5" transform="rotate(180 14 16)" fill="#656565"/>
<rect x="14" y="3" width="5" height="1" rx="0.5" transform="rotate(180 14 3)" fill="#656565"/>
<g filter="url(#filter0_d)">
<rect x="28" y="17" width="16" height="16" rx="8" transform="rotate(180 28 17)" fill="#F2C94C"/>
<rect x="28" y="17" width="16" height="16" rx="8" transform="rotate(180 28 17)" fill="url(#paint0_radial)" fill-opacity="0.25"/>
</g>
<defs>
<filter id="filter0_d" x="10" y="0" width="20" height="20" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/>
<feOffset dy="1"/>
<feGaussianBlur stdDeviation="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
</filter>
<radialGradient id="paint0_radial" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(36 22.5) rotate(90) scale(10.5)">
<stop stop-color="white"/>
<stop offset="1"/>
</radialGradient>
</defs>
<svg width="100%" height="100%" viewBox="0 0 38 23" fill="none" xmlns="http://www.w3.org/2000/svg">
<path opacity="1" d="M27 18H7C3.1 18 0 14.9 0 11C0 7.1 3.1 4 7 4H27C30.9 4 34 7.1 34 11C34 14.9 30.9 18 27 18Z" fill="#294FC4"/>
<g filter="url(#filter0_dd)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M27 21C32.5228 21 37 16.5228 37 11C37 5.47715 32.5228 1 27 1C21.4772 1 17 5.47715 17 11C17 16.5228 21.4772 21 27 21Z" fill="#B8C1CC"/>
</g>
<defs>
<filter id="filter0_dd" x="16" y="0" width="22" height="23" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/>
<feOffset dy="1"/>
<feGaussianBlur stdDeviation="0.5"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.237602 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/>
<feOffset/>
<feGaussianBlur stdDeviation="0.5"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.12 0"/>
<feBlend mode="normal" in2="effect1_dropShadow" result="effect2_dropShadow"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect2_dropShadow" result="shape"/>
</filter>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

@ -1,4 +1,4 @@
<svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg">
<svg width="100%" height="100%" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="10.5" cy="10.5" r="9" stroke="#999999" stroke-width="3"/>
<rect x="18.0607" y="15.9393" width="9.01471" height="3" rx="1.5" transform="rotate(45 18.0607 15.9393)" fill="#999999"/>
</svg>

Before

Width:  |  Height:  |  Size: 295 B

After

Width:  |  Height:  |  Size: 299 B

@ -1,11 +0,0 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0)">
<path d="M12.7531 24H11.2469C10.0286 24 9.03745 23.0089 9.03745 21.7906V21.2811C8.51953 21.1156 8.01633 20.9067 7.53291 20.6565L7.17178 21.0177C6.29714 21.8934 4.89609 21.8677 4.04686 21.0173L2.98228 19.9528C2.13155 19.103 2.10708 17.7024 2.98256 16.8279L3.34341 16.467C3.09323 15.9836 2.88441 15.4805 2.71889 14.9625H2.20936C0.991172 14.9625 0 13.9714 0 12.7531V11.2469C0 10.0286 0.991172 9.0375 2.20941 9.0375H2.71894C2.88445 8.51953 3.09328 8.01638 3.34345 7.53295L2.98233 7.17188C2.10736 6.29784 2.1315 4.89712 2.98261 4.04695L4.04728 2.98233C4.89848 2.12995 6.2992 2.10867 7.17216 2.98261L7.53295 3.34341C8.01638 3.09328 8.51958 2.88441 9.0375 2.71889V2.20936C9.0375 0.991125 10.0286 0 11.2469 0H12.7531C13.9714 0 14.9625 0.991125 14.9625 2.20936V2.71894C15.4804 2.88441 15.9836 3.09328 16.467 3.34345L16.8282 2.98233C17.7028 2.10661 19.1039 2.1323 19.9531 2.98266L21.0177 4.04719C21.8684 4.89698 21.8929 6.29756 21.0174 7.17211L20.6565 7.53295C20.9067 8.01638 21.1155 8.51948 21.2811 9.0375H21.7906C23.0088 9.0375 24 10.0286 24 11.2469V12.7531C24 13.9714 23.0088 14.9625 21.7906 14.9625H21.2811C21.1155 15.4805 20.9067 15.9836 20.6565 16.467L21.0177 16.8282C21.8926 17.7022 21.8685 19.1029 21.0174 19.9531L19.9527 21.0177C19.1015 21.8701 17.7008 21.8914 16.8278 21.0174L16.467 20.6566C15.9836 20.9068 15.4804 21.1156 14.9625 21.2812V21.7907C14.9625 23.0089 13.9714 24 12.7531 24ZM7.76798 19.1798C8.43956 19.577 9.16238 19.8771 9.91631 20.0716C10.2268 20.1518 10.4438 20.4318 10.4438 20.7525V21.7906C10.4438 22.2335 10.8041 22.5938 11.2469 22.5938H12.7531C13.196 22.5938 13.5563 22.2335 13.5563 21.7906V20.7525C13.5563 20.4318 13.7732 20.1518 14.0837 20.0716C14.8377 19.8771 15.5605 19.577 16.2321 19.1798C16.5084 19.0164 16.8602 19.0609 17.0872 19.2879L17.8226 20.0233C18.1396 20.3407 18.6488 20.3334 18.9581 20.0236L20.0234 18.9584C20.3319 18.6502 20.3422 18.141 20.0237 17.8228L19.288 17.0871C19.061 16.8601 19.0166 16.5083 19.1799 16.232C19.5771 15.5605 19.8771 14.8377 20.0717 14.0837C20.1518 13.7732 20.4319 13.5563 20.7525 13.5563H21.7906C22.2335 13.5563 22.5938 13.196 22.5938 12.7532V11.2469C22.5938 10.8041 22.2335 10.4438 21.7906 10.4438H20.7525C20.4318 10.4438 20.1518 10.2269 20.0717 9.91641C19.8771 9.16242 19.5771 8.43961 19.1799 7.76808C19.0166 7.4918 19.061 7.13995 19.288 6.91298L20.0234 6.17756C20.3413 5.86003 20.333 5.35097 20.0237 5.04202L18.9585 3.97678C18.6497 3.66759 18.1404 3.65855 17.8229 3.9765L17.0872 4.7122C16.8603 4.93922 16.5083 4.98366 16.2321 4.82025C15.5605 4.42308 14.8377 4.12303 14.0838 3.92845C13.7733 3.84834 13.5563 3.56831 13.5563 3.24764V2.20936C13.5563 1.76653 13.196 1.40625 12.7532 1.40625H11.247C10.8041 1.40625 10.4438 1.76653 10.4438 2.20936V3.24755C10.4438 3.56822 10.2269 3.84825 9.91636 3.92836C9.16242 4.12294 8.43961 4.42298 7.76803 4.82016C7.49166 4.98352 7.13986 4.93908 6.91289 4.71211L6.17752 3.97669C5.86045 3.65925 5.35125 3.66661 5.04202 3.97636L3.97669 5.04164C3.66816 5.3498 3.65784 5.859 3.97641 6.17719L4.71211 6.91289C4.93908 7.13986 4.98352 7.4917 4.82016 7.76798C4.42298 8.43952 4.12298 9.16233 3.92841 9.91631C3.84825 10.2268 3.56822 10.4437 3.24759 10.4437H2.20941C1.76658 10.4437 1.40625 10.804 1.40625 11.2469V12.7531C1.40625 13.196 1.76658 13.5563 2.20941 13.5563H3.24755C3.56822 13.5563 3.8482 13.7732 3.92836 14.0836C4.12294 14.8376 4.42298 15.5604 4.82011 16.232C4.98347 16.5083 4.93903 16.8601 4.71206 17.0871L3.97664 17.8225C3.65873 18.14 3.66703 18.6491 3.97636 18.958L5.04159 20.0233C5.35036 20.3325 5.85961 20.3415 6.17714 20.0235L6.9128 19.2878C7.08005 19.1206 7.428 18.9788 7.76798 19.1798Z" fill="white"/>
<path d="M12.0002 17.2216C9.1208 17.2216 6.77832 14.8791 6.77832 11.9997C6.77832 9.12036 9.1208 6.77783 12.0002 6.77783C14.8796 6.77783 17.2221 9.12036 17.2221 11.9997C17.2221 14.8791 14.8796 17.2216 12.0002 17.2216ZM12.0002 8.18408C9.89621 8.18408 8.18457 9.89577 8.18457 11.9997C8.18457 14.1036 9.89626 15.8153 12.0002 15.8153C14.1041 15.8153 15.8158 14.1036 15.8158 11.9997C15.8158 9.89577 14.1042 8.18408 12.0002 8.18408Z" fill="white"/>
</g>
<defs>
<clipPath id="clip0">
<rect width="24" height="24" fill="white"/>
</clipPath>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 4.2 KiB

@ -0,0 +1,3 @@
<svg width="100%" height="80%" viewBox="0 0 24 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M9.89062 5.89062C10.4844 5.29688 11.1875 5 12 5C12.8125 5 13.5156 5.29688 14.1094 5.89062C14.7031 6.48438 15 7.1875 15 8C15 8.8125 14.7031 9.51562 14.1094 10.1094C13.5156 10.7031 12.8125 11 12 11C11.1875 11 10.4844 10.7031 9.89062 10.1094C9.29688 9.51562 9 8.8125 9 8C9 7.1875 9.29688 6.48438 9.89062 5.89062ZM8.4375 11.5625C9.4375 12.5312 10.625 13.0156 12 13.0156C13.375 13.0156 14.5469 12.5312 15.5156 11.5625C16.5156 10.5625 17.0156 9.375 17.0156 8C17.0156 6.625 16.5156 5.45312 15.5156 4.48438C14.5469 3.48438 13.375 2.98438 12 2.98438C10.625 2.98438 9.4375 3.48438 8.4375 4.48438C7.46875 5.45312 6.98438 6.625 6.98438 8C6.98438 9.375 7.46875 10.5625 8.4375 11.5625ZM5.29688 2.5625C7.29688 1.1875 9.53125 0.5 12 0.5C14.4688 0.5 16.7031 1.1875 18.7031 2.5625C20.7031 3.9375 22.1406 5.75 23.0156 8C22.1406 10.25 20.7031 12.0625 18.7031 13.4375C16.7031 14.8125 14.4688 15.5 12 15.5C9.53125 15.5 7.29688 14.8125 5.29688 13.4375C3.29688 12.0625 1.85938 10.25 0.984375 8C1.85938 5.75 3.29688 3.9375 5.29688 2.5625Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -1,4 +1,4 @@
<svg width="20" height="21" viewBox="0 0 20 21" fill="none"
<svg width="100%" height="100%" viewBox="0 0 20 21" fill="none"
xmlns="http://www.w3.org/2000/svg">
<g filter="url(#filter0_d)">
<path d="M19 8.82C18.91 4.13 15.22 0.3 10.54 0.0200005V0.0100002L9.82001 0V0.0100002C5.13001 0.1 1.29999 3.79 1.01999 8.47H1.00998L1 9.19H1.00998C1.09998 13.88 4.79 17.71 9.47 17.99V18L10.19 18.01V18C14.88 17.91 18.71 14.22 18.99 9.54H19V8.82ZM14.69 8.73C14.69 7.22 14.49 5.81 14.15 4.57C14.99 4.35 15.76 4.06 16.43 3.71C17.58 5.11 18.29 6.88 18.33 8.81L14.69 8.73ZM12.25 0.98C13.68 1.38 14.95 2.16 15.96 3.19C15.36 3.49 14.69 3.74 13.95 3.93C13.52 2.69 12.94 1.67 12.25 0.98ZM13.29 4.08C12.41 4.26 11.45 4.36 10.46 4.36L10.53 0.72C11.66 0.97 12.66 2.24 13.29 4.08ZM9.81 0.71L9.73999 4.35C8.74999 4.31 7.79999 4.17 6.92999 3.95C7.62999 2.14 8.67 0.91 9.81 0.71ZM6.26999 3.77C5.53999 3.55 4.87001 3.27 4.29001 2.95C5.34001 1.96 6.64 1.24 8.09 0.89C7.37 1.56 6.74999 2.55 6.26999 3.77ZM9.72998 5.02L9.64999 8.63L6.00998 8.56C6.06998 7.12 6.32 5.76 6.69 4.6C7.63 4.83 8.64998 4.98 9.72998 5.02ZM9.63998 9.35L9.57001 12.96C8.50001 12.96 7.47 13.07 6.53 13.27C6.2 12.09 6.00998 10.72 6.00998 9.28L9.63998 9.35ZM9.54999 13.64L9.47998 17.28C8.34998 17.03 7.36 15.76 6.72 13.92C7.61 13.74 8.55999 13.64 9.54999 13.64ZM7.75998 17.02C6.32998 16.62 5.05999 15.84 4.04999 14.81C4.64999 14.51 5.32 14.26 6.06 14.07C6.49 15.31 7.06998 16.33 7.75998 17.02ZM10.2 17.29L10.27 13.65C11.26 13.69 12.21 13.83 13.08 14.05C12.38 15.86 11.34 17.09 10.2 17.29ZM13.74 14.23C14.47 14.45 15.14 14.73 15.72 15.05C14.67 16.04 13.37 16.76 11.92 17.11C12.64 16.44 13.26 15.45 13.74 14.23ZM10.28 12.98L10.35 9.36L13.99 9.43C13.93 10.87 13.68 12.23 13.31 13.4C12.38 13.17 11.36 13.02 10.28 12.98ZM10.37 8.65L10.44 5.04C11.51 5.04 12.54 4.93 13.48 4.74C13.81 5.92 14 7.29 14 8.73L10.37 8.65ZM3.79999 3.46C4.44999 3.84 5.21001 4.16 6.04001 4.42C5.65001 5.64 5.38999 7.05 5.32999 8.55L1.69 8.48C1.82 6.55 2.59999 4.8 3.79999 3.46ZM5.32001 9.27C5.32001 10.78 5.51999 12.19 5.85999 13.43C5.01999 13.65 4.24999 13.94 3.57999 14.3C2.42999 12.9 1.71999 11.13 1.67999 9.2L5.32001 9.27ZM16.21 14.54C15.55 14.16 14.8 13.84 13.97 13.58C14.36 12.36 14.62 10.95 14.68 9.44L18.32 9.51C18.19 11.45 17.41 13.2 16.21 14.54Z" fill="white"/>

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

@ -3,10 +3,11 @@
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1 user-scalable=0">
<meta name="theme-color" content="#000000" />
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;700&display=swap" rel="stylesheet">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap" rel="stylesheet">
<script src="https://js.stripe.com/v3" async></script>
<title>Instat TV</title>
</head>
@ -15,4 +16,4 @@
<div id="modal-root"></div>
<div id="root"></div>
</body>
</html>
</html>

@ -1,3 +1,5 @@
export const isProduction = process.env.REACT_APP_PRODUCTION === 'true'
export const ENV = process.env.REACT_APP_ENV || 'staging'
export const isProduction = ENV === 'production' || ENV === 'preproduction'
export const STRIPE_PUBLIC_KEY = process.env.REACT_APP_STRIPE_PK || 'pk_test_fkEjSoWfJXuCwMgwHRpbOGPt'

@ -9,7 +9,10 @@ export const formIds = {
firstname: 'firstname',
formError: 'formError',
initialCountryId: 'initialCountryId',
language: 'language',
lastname: 'lastname',
newPassword1: 'newPassword1',
newPassword2: 'newPassword2',
password: 'password',
phone: 'phone',
postalCode: 'postal_code',

@ -5,10 +5,13 @@ import { publicLexics } from './public'
const matchPopupLexics = {
apply: 13491,
episode_duration: 13410,
events: 1020,
gk: 3515,
go_back_to_match: 13405,
languages: 15030,
match_interviews: 13031,
match_settings: 13490,
players_episodes: 13398,
playlist_format: 13406,
playlist_format_all_actions: 13408,
playlist_format_all_match_time: 13407,
@ -16,20 +19,32 @@ const matchPopupLexics = {
sec_after: 13412,
sec_before: 13411,
selected_player_actions: 13413,
team_players: 13398,
watch: 818,
watch_from: 13022,
watch_live_stream: 13020,
watch_players_episodes: 14052,
}
const buyMatchPopupLexics = {
add: 15075,
adding_card: 15074,
buy_for: 14095,
buy_subscription: 13565,
change_card: 13564,
choose_subscription: 13563,
description_all_season_matches: 15069,
description_all_team_matches: 15070,
description_away_team_matches: 15072,
description_home_team_matches: 15071,
description_match_live_and_on_demand: 15068,
error_not_enough_balance: 14098,
for_month: 13561,
for_view: 15064,
for_year: 13562,
pass_league: 15065,
pass_match_access: 15067,
pass_team: 15066,
pay: 15073,
payment: 14096,
payment_confirmation: 14094,
per_month: 13573,
@ -39,9 +54,8 @@ const buyMatchPopupLexics = {
}
export const indexLexics = {
add_to_favorites: 1701,
add_to_favorites: 14967,
add_to_favorites_error: 12943,
added_to_favorites: 13048,
all_matches_shown: 13386,
available_matches_shown: 13385,
basketball: 6960,
@ -72,15 +86,15 @@ export const indexLexics = {
match_video: 13025,
no_match_access_body: 13419,
no_match_access_title: 13418,
player: 630,
player: 14975,
players_video: 13032,
round_highilights: 13050,
save: 828,
search_results: 9014,
sport: 12993,
team: 658,
team: 14973,
to_home: 13376,
tournament: 1009,
tournament: 14974,
user_account: 12928,
watch_from_beginning: 13021,
watch_from_last_pause: 13022,

@ -24,14 +24,16 @@ export const publicLexics = {
form_phone: 1656,
form_postal_code: 12913,
form_region: 12932,
go_back: 1907,
login: 13404,
next: 10875,
register: 13328,
registration_successful: 12945,
select_language: 1005,
sign_up: 1305,
step_title_card: 12917,
step_title_login: 13404,
step_title_registration: 13328,
step_title_registration: 1306,
step_title_subscription: 12919,
subscription_done: 2668,
subscription_extra: 6036,

@ -3,6 +3,8 @@ import { paymentLexics } from './payment'
const navigations = {
bank_card: 14205,
logout: 15058,
my_devices: 15052,
my_subscriptions: 8316,
payment_history: 14206,
personal_info: 14204,
@ -10,20 +12,30 @@ const navigations = {
export const userAccountLexics = {
change: 12614,
change_password: 15054,
country: 835,
delete: 848,
delete_card: 8692,
language: 15053,
lastname: 858,
mail: 12912,
main: 13014,
month: 13019,
name: 645,
next_debit: 13018,
password_current: 15055,
password_new: 15056,
password_repeat: 15057,
payment: 13015,
payment_info: 15059,
phone: 1656,
remove: 15063,
save_changes: 13017,
select_subscription: 12583,
subs_will_not_be_renewed: 15060,
subscriptions: 13016,
subscriptions_active: 15061,
subscriptions_removed: 15062,
user_account: 12928,
...navigations,
...publicLexics,

@ -1,5 +1,4 @@
export const PAGES = {
extendedSearch: '/search',
home: '/',
login: '/login',
match: '/matches',

@ -29,5 +29,6 @@ export const PROCEDURES = {
save_user_favorite: 'save_user_favorite',
save_user_info: 'save_user_info',
save_user_match_second: 'save_user_match_second',
save_user_page: 'save_user_page',
save_user_subscription: 'save_user_subscription',
}

@ -1,2 +1,10 @@
export const API_ROOT = 'https://api.instat.tv'
import { ENV } from './env'
const APIS = {
preproduction: 'https://api-test.instat.tv',
production: 'https://api.instat.tv',
staging: 'https://api-staging.instat.tv',
}
export const API_ROOT = APIS[ENV]
export const DATA_URL = `${API_ROOT}/data`

@ -0,0 +1,5 @@
import { includes } from 'lodash'
export const isMobileDevice = includes(window.navigator.userAgent, 'Android') || includes(window.navigator.userAgent, 'iPhone')
// удалю когда закончу с адаптивом.
// || includes(window.navigator.userAgent, 'Linux')

@ -1,6 +1,8 @@
import { ReactNode } from 'react'
import styled from 'styled-components/macro'
import styled, { css } from 'styled-components/macro'
import { isMobileDevice } from 'config/userAgent'
import { T9n } from 'features/T9n'
@ -30,15 +32,42 @@ const Label = styled.label<LabelProps>`
:not(:first-child) {
margin-top: 10px;
}
${isMobileDevice
? css`
height: 36px;
font-size: 12px;
padding: 0 13px;
align-items: center;
:nth-child(3){
width: 48%;
}
:nth-child(4){
width: 48%;
}
`
: ''};
`
const Text = styled(T9n)`
margin-right: 20px;
margin-right: 5px;
white-space: nowrap;
${isMobileDevice
? css`
line-height: 12px;
`
: ''};
`
const ElementWrapper = styled.div`
height: 100%;
flex-grow: 1;
${isMobileDevice
? css`
height: auto;
line-height: 12px;
`
: ''};
`
type Props = {

@ -1,26 +1,94 @@
import { FormEvent, useState } from 'react'
import type {
FormEvent,
ReactNode,
ChangeEvent,
} from 'react'
import {
useState,
useEffect,
} from 'react'
import type { StripeElementChangeEvent } from '@stripe/stripe-js'
import {
CardNumberElement,
useStripe,
useElements,
} from '@stripe/react-stripe-js'
import toUpper from 'lodash/toUpper'
import { useObjectState } from 'hooks'
import { useCardsStore } from 'features/CardsStore'
export enum ElementTypes {
CardCvc = 'cardCvc',
CardExpiry = 'cardExpiry',
CardHolder = 'cardHolder',
CardNumber = 'cardNumber',
}
export type Props = {
children?: ReactNode,
initialformOpen?: boolean,
inputsBackground?: string,
onAddSuccess?: () => void,
submitButton?: 'outline' |'solid',
}
const inputState = {
empty: true,
focused: false,
}
const initialState = {
cardCvc: inputState,
cardExpiry: inputState,
cardHolder: inputState,
cardNumber: inputState,
}
export const useFormSubmit = ({ onAddSuccess }: Props) => {
const stripe = useStripe()
const elements = useElements()
const { onAddCard } = useCardsStore()
const { onAddCard, setError: setCardError } = useCardsStore()
const [name, setName] = useState('')
const [inputStates, setInputStates] = useObjectState(initialState)
const [error, setError] = useState('')
const onNameChange = (e: ChangeEvent<HTMLInputElement>) => {
const { value } = e.target
if (/^[A-Za-z]{0,500}$/.test(value)) {
setName(toUpper(value))
const cardHolderState = inputStates[ElementTypes.CardHolder]
setInputStates({
[ElementTypes.CardHolder]: {
...cardHolderState,
empty: !value,
},
})
}
}
const onInputsChange = (e: StripeElementChangeEvent) => {
const value = inputStates[e.elementType as ElementTypes]
setInputStates({ [e.elementType]: { ...value, empty: e.empty } })
}
const onInputsFocus = (elementType: ElementTypes) => () => {
const value = inputStates[elementType as ElementTypes]
setInputStates({ [elementType]: { ...value, focused: true } })
}
const onInputsBlur = (elementType: ElementTypes) => () => {
const value = inputStates[elementType as ElementTypes]
setInputStates({ [elementType]: { ...value, focused: false } })
}
const isLabelVisible = (elementType: ElementTypes) => (
inputStates[elementType].empty && !inputStates[elementType].focused
)
const handleSubmit = async (e: FormEvent<HTMLFormElement>) => {
e.preventDefault()
@ -29,8 +97,6 @@ export const useFormSubmit = ({ onAddSuccess }: Props) => {
return
}
const name: string = e.currentTarget.cardHolderName.value
if (!name) {
setError('Name can not be empty')
return
@ -51,5 +117,18 @@ export const useFormSubmit = ({ onAddSuccess }: Props) => {
}
}
return { error, handleSubmit }
useEffect(() => {
setCardError('')
}, [setCardError])
return {
error,
handleSubmit,
isLabelVisible,
name,
onInputsBlur,
onInputsChange,
onInputsFocus,
onNameChange,
}
}

@ -4,14 +4,16 @@ import {
CardCvcElement,
} from '@stripe/react-stripe-js'
import { isMobileDevice } from 'config/userAgent'
import { T9n } from 'features/T9n'
import { useCardsStore } from 'features/CardsStore'
import { OutlineButton, SolidButton } from 'features/UserAccount/styled'
import { SolidButton } from 'features/UserAccount/styled'
import { ElementContainer } from '../ElementContainer'
import type { Props } from './hooks'
import { useFormSubmit } from './hooks'
import { useFormSubmit, ElementTypes } from './hooks'
import {
Form,
@ -19,64 +21,97 @@ import {
ButtonsBlock,
Input,
Errors,
SectionTitle,
} from '../../styled'
const baseStyles = {
color: '#fff',
fontFamily: 'Montserrat, Tahoma, sans-serif',
fontSize: '20px',
fontWeight: 'bold',
lineHeight: '50px',
}
const baseStyles = isMobileDevice
? {
color: '#fff',
fontSize: '12px',
fontWeight: 'bold',
lineHeight: '12px',
}
: {
color: '#fff',
fontFamily: 'Montserrat, Tahoma, sans-serif',
fontSize: '20px',
fontWeight: 'bold',
lineHeight: '50px',
}
const options = { placeholder: '', style: { base: baseStyles } }
const buttons = {
outline: OutlineButton,
solid: SolidButton,
}
export const AddCardFormInner = (props: Props) => {
const {
children,
inputsBackground,
submitButton = 'solid',
} = props
const { error: cardError } = useCardsStore()
const { error: formError, handleSubmit } = useFormSubmit(props)
const SubmitButton = buttons[submitButton]
const {
error: formError,
handleSubmit,
isLabelVisible,
name,
onInputsBlur,
onInputsChange,
onInputsFocus,
onNameChange,
} = useFormSubmit(props)
return (
<Form onSubmit={handleSubmit}>
<SectionTitle>
<T9n t='adding_card' />
</SectionTitle>
<Column>
<ElementContainer
label='form_card_number'
label={isLabelVisible(ElementTypes.CardNumber) ? 'form_card_number' : ''}
backgroundColor={inputsBackground}
>
<CardNumberElement options={options} />
<CardNumberElement
options={options}
onChange={onInputsChange}
onFocus={onInputsFocus(ElementTypes.CardNumber)}
onBlur={onInputsBlur(ElementTypes.CardNumber)}
/>
</ElementContainer>
<ElementContainer
label='card_holder_name'
label={isLabelVisible(ElementTypes.CardHolder) ? 'card_holder_name' : ''}
backgroundColor={inputsBackground}
>
<Input name='cardHolderName' />
<Input
value={name}
onChange={onNameChange}
onFocus={onInputsFocus(ElementTypes.CardHolder)}
onBlur={onInputsBlur(ElementTypes.CardHolder)}
/>
</ElementContainer>
<ElementContainer
label='form_card_expiration'
label={isLabelVisible(ElementTypes.CardExpiry) ? 'form_card_expiration' : ''}
width='275px'
backgroundColor={inputsBackground}
>
<CardExpiryElement options={options} />
<CardExpiryElement
options={options}
onChange={onInputsChange}
onFocus={onInputsFocus(ElementTypes.CardExpiry)}
onBlur={onInputsBlur(ElementTypes.CardExpiry)}
/>
</ElementContainer>
<ElementContainer
label='form_card_code'
label={isLabelVisible(ElementTypes.CardCvc) ? 'form_card_code' : ''}
width='275px'
backgroundColor={inputsBackground}
>
<CardCvcElement options={options} />
<CardCvcElement
options={options}
onChange={onInputsChange}
onFocus={onInputsFocus(ElementTypes.CardCvc)}
onBlur={onInputsBlur(ElementTypes.CardCvc)}
/>
</ElementContainer>
</Column>
<ButtonsBlock>
@ -87,9 +122,11 @@ export const AddCardFormInner = (props: Props) => {
</Errors>
) }
<SubmitButton type='submit'>
Сохранить
</SubmitButton>
{children || (
<SolidButton type='submit'>
Сохранить
</SolidButton>
)}
</ButtonsBlock>
</Form>
)

@ -9,9 +9,10 @@ import type { Props } from './components/Form/hooks'
import { AddCardFormInner } from './components/Form'
export const AddCardForm = ({
children,
initialformOpen,
inputsBackground,
submitButton,
onAddSuccess,
}: Props) => {
const { isOpen, toggle } = useToggle(initialformOpen)
@ -20,14 +21,20 @@ export const AddCardForm = ({
toggle()
}
const onSuccess = () => {
onAddSuccess?.()
toggle()
}
return (
isOpen
? (
<AddCardFormInner
inputsBackground={inputsBackground}
onAddSuccess={toggle}
submitButton={submitButton}
/>
onAddSuccess={onSuccess}
>
{children}
</AddCardFormInner>
)
: (
<OutlineButton

@ -1,4 +1,5 @@
import styled from 'styled-components/macro'
import styled, { css } from 'styled-components/macro'
import { isMobileDevice } from 'config/userAgent'
export const Form = styled.form``
@ -12,8 +13,8 @@ export const Column = styled.div`
export const ButtonsBlock = styled.div`
display: flex;
flex-direction: column;
align-items: start;
margin-top: 40px;
align-items: center;
margin-top: 25px;
`
export const Input = styled.input`
@ -34,9 +35,17 @@ export const Input = styled.input`
:-webkit-autofill:focus,
:-webkit-autofill:active {
box-shadow: 0 0 0 30px #535353 inset;
caret-color: ${({ theme: { colors } }) => colors.text};
-webkit-text-fill-color: ${({ theme: { colors } }) => colors.text};
caret-color: ${({ theme: { colors } }) => colors.text100};
-webkit-text-fill-color: ${({ theme: { colors } }) => colors.text100};
}
${isMobileDevice
? css`
line-height: 16px;
font-size: 12px;
max-height: 12px;
height: auto;
`
: ''};
`
export const Errors = styled.span`
@ -44,4 +53,27 @@ export const Errors = styled.span`
font-size: 16px;
line-height: 16px;
color: red;
${isMobileDevice
? css`
margin-bottom: 10px;
font-size: 12px;
`
: ''};
`
export const SectionTitle = styled.span`
display: inline-block;
font-weight: 600;
font-size: 12px;
line-height: 18px;
text-transform: uppercase;
color: ${({ theme }) => theme.colors.text50};
margin-bottom: 8px;
${isMobileDevice
? css`
margin-bottom: 25px;
font-size: 10px;
`
: ''};
`

@ -13,18 +13,15 @@ import { StripeElements } from 'features/StripeElements'
import { useLexicsConfig } from 'features/LexicsStore'
import { ExtendedSearchStore, ExtendedSearchPage } from 'features/ExtendedSearchPage'
import { ExtendedSearchStore } from 'features/ExtendedSearchPage'
import { MatchSwitchesStore } from 'features/MatchSwitches'
import { UserFavoritesStore } from 'features/UserFavorites/store'
import { MatchPopup, MatchPopupStore } from 'features/MatchPopup'
import { BuyMatchPopup, BuyMatchPopupStore } from 'features/BuyMatchPopup'
import { CardsStore } from 'features/CardsStore'
import { ProfileRoutes } from 'features/ProfileRoutes'
const HomePage = lazy(() => import('features/HomePage'))
const TeamPage = lazy(() => import('features/TeamPage'))
const MatchPage = lazy(() => import('features/MatchPage'))
const PlayerPage = lazy(() => import('features/PlayerPage'))
const TournamentPage = lazy(() => import('features/TournamentPage'))
const UserAccount = lazy(() => import('features/UserAccount'))
export const AuthenticatedApp = () => {
@ -49,21 +46,7 @@ export const AuthenticatedApp = () => {
<Route exact path={PAGES.home}>
<HomePage />
</Route>
<Route path={`/:sportName${PAGES.tournament}/:pageId`}>
<TournamentPage />
</Route>
<Route path={`/:sportName${PAGES.team}/:pageId`}>
<TeamPage />
</Route>
<Route path={`/:sportName${PAGES.player}/:pageId`}>
<PlayerPage />
</Route>
<Route path={`/:sportName${PAGES.match}/:pageId`}>
<MatchPage />
</Route>
<Route path={PAGES.extendedSearch}>
<ExtendedSearchPage />
</Route>
<ProfileRoutes />
<Redirect to={PAGES.home} />
</Switch>
</BuyMatchPopupStore>

@ -6,14 +6,15 @@ import {
Switch,
} from 'react-router-dom'
import styled from 'styled-components/macro'
import styled, { css } from 'styled-components/macro'
import { PAGES } from 'config'
import { publicLexics } from 'config/lexics/public'
import { useLexicsConfig } from 'features/LexicsStore'
import { LanguageSelect } from 'features/LanguageSelect'
import { HeaderStyled, HeaderGroup } from 'features/ProfileHeader/styled'
import { HeaderGroup } from 'features/ProfileHeader/styled'
import { isMobileDevice } from 'config/userAgent'
import { RedirectCallback } from './RedirectCallback'
@ -22,6 +23,26 @@ const Register = lazy(() => import('features/Register'))
const Main = styled.main`
width: 100%;
${isMobileDevice
? css`
@media screen and (orientation: landscape){
min-height: 100vh;
}
`
: ''};
`
const HeaderStyled = styled.header`
display: flex;
justify-content: space-between;
height: 3.02rem;
padding: 0.755rem 1.369rem 0 1.04rem;
margin-bottom: 1.416rem;
${isMobileDevice
? css`
padding-top: 15px;
`
: ''};
`
export const UnauthenticatedApp = () => {

@ -3,6 +3,7 @@ import styled from 'styled-components/macro'
const Container = styled.div`
width: 100%;
min-height: 100vh;
overflow-x: hidden;
`
export const ImageBackground = styled(Container)`

@ -1,13 +1,11 @@
import isEmpty from 'lodash/isEmpty'
import { AddCardForm } from 'features/AddCardForm'
import { AddCardFormInner } from 'features/AddCardForm/components/Form'
import { useCardsStore } from 'features/CardsStore'
import { useBuyMatchPopupStore } from 'features/BuyMatchPopup/store'
import {
CloseButton,
Header,
HeaderActions,
HeaderTitle,
} from 'features/PopupComponents'
import { T9n } from 'features/T9n'
@ -16,41 +14,39 @@ import { CardsList } from '../CardsList'
import {
Wrapper,
Body,
Footer,
Header,
HeaderTitle,
Button,
} from '../../styled'
export const CardStep = () => {
const { cards } = useCardsStore()
const { close, subscribeToMatch } = useBuyMatchPopupStore()
const { close, goBack } = useBuyMatchPopupStore()
const emptyCards = isEmpty(cards)
return (
<Wrapper width={630}>
<Header height={50}>
<Wrapper width={642}>
<Header>
<HeaderTitle>
{emptyCards ? 'Добавление карты' : 'Выберите карту для оплаты'}
<T9n t='pay' />
</HeaderTitle>
<HeaderActions position='right'>
<CloseButton onClick={close} />
</HeaderActions>
</Header>
<Body padding='0 35px' marginBottom={40}>
<Body padding='12px 40px 0 40px'>
<CardsList />
<AddCardForm
<AddCardFormInner
onAddSuccess={goBack}
initialformOpen={emptyCards}
submitButton='outline'
inputsBackground='rgba(255, 255, 255, 0.1)'
/>
</Body>
<Footer>
{!emptyCards && (
<Button onClick={subscribeToMatch}>
<T9n t='buy_subscription' />
>
<Button type='submit'>
<T9n t='add' />
</Button>
)}
</Footer>
</AddCardFormInner>
</Body>
</Wrapper>
)
}

@ -1,15 +1,21 @@
import map from 'lodash/map'
import styled from 'styled-components/macro'
import styled, { css } from 'styled-components/macro'
import { Radio } from 'features/Common'
import { isMobileDevice } from 'config/userAgent'
import { Radio as RadioBase } from 'features/Common'
import { Label } from 'features/Common/Radio/styled'
import { RadioSvg } from 'features/Common/Radio/Icon'
import { useCardsStore } from 'features/CardsStore'
const List = styled.ul`
width: 100%;
display: flex;
flex-wrap: wrap;
margin-top: 20px;
margin-bottom: 25px;
:not(:empty) {
margin-bottom: 10px;
}
`
const Item = styled.li`
@ -17,6 +23,38 @@ const Item = styled.li`
height: 50px;
display: flex;
align-items: center;
${isMobileDevice
? css`
width: 100%;
height: 21px;
margin-bottom: 14px;
`
: ''}
`
const Radio = styled(RadioBase)`
${Label} {
font-weight: normal;
font-size: 14px;
line-height: 21px;
${isMobileDevice
? css`
font-size: 12px;
line-height: 100%;
`
: ''}
}
${RadioSvg} {
margin-right: 12px;
${isMobileDevice
? css`
margin-right: 18px;
width: 16px;
height: 16px;
`
: ''}
}
`
export const CardsList = () => {

@ -1,36 +1,38 @@
import { T9n } from 'features/T9n'
import {
Header,
HeaderTitle,
HeaderActions,
CloseButton,
} from 'features/PopupComponents'
import { Header, HeaderTitle } from 'features/PopupComponents'
import { useBuyMatchPopupStore } from '../../store'
import {
Wrapper,
Body,
Footer,
ResultText,
SmallButton,
} from '../../styled'
import { useBuyMatchPopupStore } from '../../store'
export const ErrorStep = () => {
const { close, error: paymentError } = useBuyMatchPopupStore()
const {
close,
error: paymentError,
} = useBuyMatchPopupStore()
return (
<Wrapper width={517}>
<Header height={50}>
<Wrapper height={278} width={369}>
<Header height={24}>
<HeaderTitle>
<T9n t='payment' />
</HeaderTitle>
<HeaderActions position='right'>
<CloseButton onClick={close} />
</HeaderActions>
</Header>
<Body marginTop={30} marginBottom={35}>
<Body marginTop={30} marginBottom={40}>
<ResultText>
{paymentError || <T9n t='error_payment_unsuccessful' />}
</ResultText>
</Body>
<Footer>
<SmallButton onClick={close}>
Ок
</SmallButton>
</Footer>
</Wrapper>
)
}

@ -1,14 +1,25 @@
import styled from 'styled-components/macro'
import styled, { css } from 'styled-components/macro'
import { isMobileDevice } from 'config/userAgent'
import capitalize from 'lodash/capitalize'
import { useCardsStore } from 'features/CardsStore'
import { ButtonOutline } from 'features/Common'
import { T9n } from 'features/T9n'
import { useBuyMatchPopupStore } from 'features/BuyMatchPopup/store'
import { Steps } from 'features/BuyMatchPopup/types'
const Wrapper = styled.div`
display: flex;
margin-top: 40px;
margin-bottom: 30px;
padding: 0 35px;
margin-top: 25px;
padding: 0 40px;
${isMobileDevice
? css`
padding: 0;
justify-content: center;
align-items: center;
`
: ''};
`
const CardInfo = styled.span`
@ -16,9 +27,38 @@ const CardInfo = styled.span`
font-size: 18px;
line-height: 20px;
color: rgba(255, 255, 255, 0.7);
${isMobileDevice
? css`
font-size: 14px;
`
: ''};
`
const ChangeCardButton = styled(ButtonOutline)`
border: none;
padding: 0;
width: auto;
height: auto;
padding: 0 10px;
margin-left: 10px;
line-height: 20px;
font-size: 14px;
color: rgba(255, 255, 255, 0.5);
cursor: pointer;
:hover {
color: rgba(255, 255, 255);
}
${isMobileDevice
? css`
font-size: 12px;
`
: ''};
`
export const SelectedCard = () => {
const { goTo } = useBuyMatchPopupStore()
const { defaultCard } = useCardsStore()
if (!defaultCard) return null
@ -26,6 +66,9 @@ export const SelectedCard = () => {
return (
<Wrapper>
<CardInfo>{capitalize(defaultCard?.brand)} {defaultCard?.last4}</CardInfo>
<ChangeCardButton onClick={(e) => goTo(Steps.CardSelection, e)}>
<T9n t='change_card' />
</ChangeCardButton>
</Wrapper>
)
}

@ -6,22 +6,22 @@ import { MDASH } from 'config'
import {
CloseButton,
Header,
HeaderActions,
HeaderTitle,
} from 'features/PopupComponents'
import { T9n } from 'features/T9n'
import { Name } from 'features/Name'
import { useCardsStore } from 'features/CardsStore'
import { useBuyMatchPopupStore } from '../../store'
import { SelectedCard } from '../SelectedCard'
import { Subscriptions } from '../Subscriptions'
import { Steps } from '../../types'
import {
Wrapper,
Body,
Footer,
Button,
Header,
HeaderTitle,
} from '../../styled'
export const SubscriptionSelectionStep = () => {
@ -32,8 +32,8 @@ export const SubscriptionSelectionStep = () => {
const {
close,
goTo,
match,
onBuyClick,
selectedSubscription,
} = useBuyMatchPopupStore()
@ -47,7 +47,7 @@ export const SubscriptionSelectionStep = () => {
return (
<Wrapper>
<Header height={50}>
<Header>
<HeaderTitle>
<Name nameObj={match.team1} />
{` ${MDASH} `}
@ -57,16 +57,16 @@ export const SubscriptionSelectionStep = () => {
<CloseButton onClick={close} />
</HeaderActions>
</Header>
<Body>
<Body marginTop={15}>
<Subscriptions />
<SelectedCard />
</Body>
<Footer>
<Button
disabled={!selectedSubscription}
onClick={(e) => goTo(Steps.CardSelection, e)}
onClick={onBuyClick}
>
Далее
<T9n t='buy_subscription' />
</Button>
</Footer>
</Wrapper>

@ -1,6 +1,5 @@
import styled from 'styled-components/macro'
import { T9n } from 'features/T9n'
import { PaymentPeriodTabs } from 'features/PaymentPeriodTabs'
import { useBuyMatchPopupStore } from '../../store'
@ -10,34 +9,26 @@ const Wrapper = styled.div`
width: 100%;
display: flex;
flex-direction: column;
`
const Title = styled.span`
font-weight: normal;
font-size: 20px;
line-height: 21px;
text-transform: uppercase;
margin-top: 30px;
padding: 0 35px;
align-items: center;
`
export const Subscriptions = () => {
const {
matchSubscriptions,
onPeriodSelect,
onSubscriptionSelect,
selectedPeriod,
selectedSubscription,
subscriptions,
} = useBuyMatchPopupStore()
return (
<Wrapper>
<PaymentPeriodTabs
onPeriodSelect={onPeriodSelect}
selectedPeriod={selectedPeriod}
matchSubscriptions={matchSubscriptions}
/>
<Title>
<T9n t='choose_subscription' />
</Title>
<SubscriptionsList
subscriptions={subscriptions}
selectedSubscription={selectedSubscription}

@ -4,7 +4,9 @@ import { T9n } from 'features/T9n'
import { MatchSubscription, SubscriptionType } from 'features/BuyMatchPopup/types'
import {
Header,
Pass,
Name,
Description,
InfoWrapper,
Item,
List,
@ -27,29 +29,29 @@ export const SubscriptionsList = ({
map(
subscriptions,
(subscription) => {
const {
currency,
id,
lexic,
price,
type,
} = subscription
const { description, type } = subscription
return (
<Item
key={id}
key={subscription.id}
onClick={() => onSelect?.(subscription)}
active={subscription === selectedSubscription}
>
<InfoWrapper>
<Header>
<T9n t={lexic} />
</Header>
<Pass>
<T9n t={subscription.pass} />
</Pass>
<Name>
{subscription.name}
</Name>
<Description>
<T9n t={description.lexic} values={description.values} />
</Description>
</InfoWrapper>
<Price
amount={price}
currency={currency}
perPeriod={type === SubscriptionType.Month ? null : `per_${type}`}
amount={subscription.price}
currency={subscription.currency}
perPeriod={type !== SubscriptionType.Month ? null : `per_${type}`}
/>
</Item>
)

@ -1,18 +1,39 @@
import styled from 'styled-components/macro'
import styled, { css } from 'styled-components/macro'
import { isMobileDevice } from 'config/userAgent'
import { popupScrollbarStyles } from 'features/PopupComponents'
import { Price as BasePrice } from 'features/Price'
import { PriceAmount, PriceDetails } from 'features/Price/styled'
import {
PriceAmount,
PriceDetails,
Period,
} from 'features/Price/styled'
export const List = styled.ul`
height: 364px;
width: 100%;
height: 460px;
display: flex;
flex-direction: column;
overflow-y: auto;
margin-top: 20px;
padding: 0 35px;
margin-top: 25px;
padding: 0 40px;
${popupScrollbarStyles}
@media (max-width: 1370px) {
max-height: 415px;
}
${isMobileDevice
? css`
padding: 0;
height: 176px;
margin-top: 19px;
@media screen and (orientation: landscape){
margin-top: 10px;
height: 166px;
}
`
: ''};
`
type ItemProps = {
@ -23,9 +44,9 @@ export const Item = styled.li.attrs(() => ({
tabIndex: 0,
}))<ItemProps>`
width: 100%;
min-height: 108px;
padding: 20px;
background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%), #5C5C5C;
min-height: 140px;
padding: 20px 30px 20px 20px;
background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%), #3F3F3F;
box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.3);
border-radius: 2px;
@ -34,10 +55,6 @@ export const Item = styled.li.attrs(() => ({
align-items: center;
cursor: pointer;
:first-child {
margin-top: 2px;
}
:not(:last-child) {
margin-bottom: 20px;
}
@ -45,17 +62,116 @@ export const Item = styled.li.attrs(() => ({
${({ active }) => (
active ? 'background-color: #294FC3' : ''
)};
@media (max-width: 1370px) {
min-height: 125px;
}
@media (max-width: 750px) {
min-height: 52.29px;
height: 52.29px;
}
${isMobileDevice
? css`
padding: 5px 10px;
min-height: 52.29px;
height: 52.29px;
:not(:last-child) {
margin-bottom: 10px;
@media screen and (orientation: landscape){
margin-bottom: 5.24px;
}
@media (max-width: 850px) and (orientation: landscape){
min-height: 52.29px;
height: 52.29px;
}
}
`
: ''};
@media (max-width: 850px) and (orientation: landscape){
min-height: 52.29px;
height: 52.29px;
}
`
export const InfoWrapper = styled.div`
width: 80%;
width: 75%;
display: flex;
flex-direction: column;
align-self: flex-start;
${isMobileDevice
? css`
align-self: center;
@media (max-width: 850px) and (orientation: landscape){
height: 100%;
}
`
: ''};
`
export const Header = styled.span`
font-weight: 600;
export const Name = styled.span`
font-weight: 500;
font-size: 20px;
line-height: 23px;
letter-spacing: 0.03em;
@media (max-width: 1370px) {
line-height: 20px;
}
${isMobileDevice
? css`
@media (max-width: 750px){
font-size: 12px;
line-height: 10.04px;
}
@media screen and (orientation: landscape){
font-size: 14px;
}
`
: ''};
`
export const Pass = styled(Name)`
font-weight: 600;
text-transform: uppercase;
${isMobileDevice
? css`
line-height: 12px;
@media screen and (orientation: landscape){
line-height: 14px;
}
`
: ''};
`
export const Description = styled.span`
width: 68%;
margin-top: 13px;
font-weight: 500;
font-size: 15px;
line-height: 20px;
letter-spacing: 0.03em;
@media (max-width: 1370px) {
line-height: 18px;
}
${isMobileDevice
? css`
@media (max-width: 750px){
font-size: 8px;
line-height: 8px;
margin-top: 5px;
width: 100%;
}
@media (max-width: 850px) and (orientation: landscape){
margin-top: 0;
line-height: 8px;
font-size: 10px;
}
`
: ''};
`
export const Price = styled(BasePrice)`
@ -63,11 +179,25 @@ export const Price = styled(BasePrice)`
font-size: 24px;
line-height: 24px;
font-weight: normal;
${isMobileDevice
? css`
font-size: 14px;
`
: ''};
}
${PriceDetails} {
font-weight: 500;
font-size: 12px;
line-height: 18px;
${isMobileDevice
? css`
font-size: 8px;
`
: ''};
}
${Period} {
text-transform: capitalize;
}
`

@ -1,24 +1,32 @@
import { T9n } from 'features/T9n'
import {
Header,
HeaderTitle,
} from 'features/PopupComponents'
import { Header, HeaderTitle } from 'features/PopupComponents'
import { useBuyMatchPopupStore } from '../../store'
import {
Wrapper,
Body,
Footer,
Button,
ResultText,
SmallButton,
} from '../../styled'
import { useBuyMatchPopupStore } from '../../store'
const useSuccessStep = () => {
const { close, postPaymentHandler } = useBuyMatchPopupStore()
const closeAfterPayment = () => {
postPaymentHandler()
close()
}
return { closeAfterPayment }
}
export const SuccessStep = () => {
const { close } = useBuyMatchPopupStore()
const { closeAfterPayment } = useSuccessStep()
return (
<Wrapper width={517}>
<Header height={50}>
<Wrapper height={253} width={369}>
<Header height={24}>
<HeaderTitle>
<T9n t='payment' />
</HeaderTitle>
@ -29,9 +37,9 @@ export const SuccessStep = () => {
</ResultText>
</Body>
<Footer>
<Button onClick={close}>
<T9n t='subscription_done' />
</Button>
<SmallButton onClick={closeAfterPayment}>
Ок
</SmallButton>
</Footer>
</Wrapper>
)

@ -1,10 +1,11 @@
import { useBuyMatchPopupStore } from './store'
import { SubscriptionSelectionStep } from './components/SubscriptionSelectionStep'
import { CardStep } from './components/CardStep'
import { SuccessStep } from './components/SuccessStep'
import { ErrorStep } from './components/ErrorStep'
import { Modal } from './styled'
import { SuccessStep } from './components/SuccessStep'
import { SubscriptionSelectionStep } from './components/SubscriptionSelectionStep'
import { Steps } from './types'
import { Modal } from './styled'
import { useBuyMatchPopupStore } from './store'
export * from './store'
export * from './store/helpers'

@ -0,0 +1,23 @@
export const passLexics = {
all: 'pass_league',
team_away: 'pass_team',
team_home: 'pass_team',
team1: 'pass_team',
team2: 'pass_team',
}
export const descriptionLexics = {
all: 'description_all_season_matches',
team_away: 'description_away_team_matches',
team_home: 'description_home_team_matches',
team1: 'description_all_team_matches',
team2: 'description_all_team_matches',
}
export const passNameKeys = {
all: 'tournament',
team_away: 'team2',
team_home: 'team1',
team1: 'team1',
team2: 'team2',
} as const

@ -1,30 +1,98 @@
import map from 'lodash/map'
import reduce from 'lodash/reduce'
import { currencySymbols } from 'config'
import type { MatchSubscriptionsResponse } from 'requests'
import type {
SubscriptionsByPeriods,
Subscriptions,
} from 'requests/getSubscriptions'
import { SubscriptionType, MatchSubscriptions } from '../types'
import type { Match } from 'features/Matches'
import { getName } from 'features/Name'
export const transformSubsciptions = (
subscriptions: MatchSubscriptionsResponse,
) => (
reduce(
subscriptions,
(
acc,
periodSubscriptions,
import type { MatchSubscriptions, MatchSubscription } from '../types'
import { SubscriptionType } from '../types'
import {
passLexics,
passNameKeys,
descriptionLexics,
} from './config'
type SubscriptionArgs = {
match: Match,
subscriptions: SubscriptionsByPeriods,
suffix: string,
}
const transformSubscription = ({
match,
subscriptions,
suffix,
}: SubscriptionArgs) => (
type: SubscriptionType.Month | SubscriptionType.Year,
): Array<MatchSubscription> => {
const { season } = subscriptions
return map(subscriptions[type], (subscription, rawKey) => {
const key = rawKey as keyof Subscriptions
const teamName = getName({
nameObj: match[passNameKeys[key]],
suffix,
})
return {
currency: currencySymbols[subscription.currency_iso],
description: {
lexic: descriptionLexics[key],
values: {
season: season.name,
team: teamName,
},
},
id: `${key} ${subscription.id}`,
name: teamName,
originalObject: subscription,
pass: passLexics[key],
price: subscription.price,
seasonName: season.name,
type,
) => {
const period = type as SubscriptionType
acc[period] = map(periodSubscriptions, (subscription) => ({
currency: currencySymbols[subscription.currency_iso || 'RUB'],
type: period,
...subscription,
}))
return acc
},
{} as MatchSubscriptions,
)
)
}
})
}
type SubsciptionsArgs = {
match: Match,
subscriptions: SubscriptionsByPeriods,
suffix: string,
}
export const transformSubsciptions = ({
match,
subscriptions,
suffix,
}: SubsciptionsArgs): MatchSubscriptions => {
const { pay_per_view: payPerView } = subscriptions
const team1Name = getName({ nameObj: match.team1, suffix })
const team2Name = getName({ nameObj: match.team2, suffix })
const transformByType = transformSubscription({
match,
subscriptions,
suffix,
})
return {
[SubscriptionType.Month]: transformByType(SubscriptionType.Month),
[SubscriptionType.Year]: transformByType(SubscriptionType.Year),
[SubscriptionType.PayPerView]: [{
currency: currencySymbols[payPerView.currency_iso],
description: {
lexic: 'description_match_live_and_on_demand',
values: {},
},
id: '0',
name: `${team1Name} - ${team2Name}`,
originalObject: payPerView,
pass: 'pass_match_access',
price: payPerView.price,
type: SubscriptionType.PayPerView,
}],
}
}

@ -21,9 +21,7 @@ import {
import type { OnFailedPaymentActionData } from 'requests/buySubscription'
import type { Match } from 'features/Matches/hooks'
import type { MatchSubscription } from 'features/BuyMatchPopup/types'
import { useCardsStore } from 'features/CardsStore'
import { useMatchPopupStore } from 'features/MatchPopup'
import { Steps, SubscriptionType } from 'features/BuyMatchPopup/types'
import { getProfileUrl } from 'features/ProfileLink/helpers'
@ -33,21 +31,12 @@ import { useStripe3DSecure } from './useStripe3DSecure'
const requests = {
[SubscriptionType.Month]: buyMatchSubscription,
[SubscriptionType.Year]: buyMatchPayOnceSubscription,
[SubscriptionType.PayPerView]: buyMatchPayOnceSubscription,
}
const getSubscriptionItem = (subscription: MatchSubscription) => ({
currency_id: subscription.currency_id,
currency_iso: subscription.currency_iso,
id: subscription.id,
lexic: subscription.lexic,
price: subscription.price,
sub: subscription.sub,
})
export const useBuyMatchPopup = () => {
const history = useHistory()
const { defaultCard } = useCardsStore()
const { openMatchPopup } = useMatchPopupStore()
const { handle3DSecure } = useStripe3DSecure()
const [steps, setSteps] = useState<Array<Steps>>([])
@ -76,6 +65,7 @@ export const useBuyMatchPopup = () => {
const {
fetchSubscriptions,
matchSubscriptions,
onPeriodSelect,
onSubscriptionSelect,
resetSubscriptions,
@ -100,12 +90,11 @@ export const useBuyMatchPopup = () => {
history.push(matchLink)
}
const onSuccessfulSubscription = () => {
const onSuccessfulSubscription = () => goTo(Steps.Success)
const postPaymentHandler = () => {
closePopup()
if (!match) return
if (match.calc) {
openMatchPopup(match)
} else if (match.hasVideo) {
if (match.hasVideo || match.calc) {
redirectToMatchProfile(match)
} else {
window.location.reload()
@ -121,7 +110,7 @@ export const useBuyMatchPopup = () => {
const onConfirmationSuccess = ({ id }: PaymentIntent) => {
if (!selectedSubscription) return
const item = getSubscriptionItem(selectedSubscription)
const item = selectedSubscription.originalObject
notifySuccessfulSubscription({ item, paymentIntentId: id })
.then(onSuccessfulSubscription, goToError)
}
@ -143,7 +132,7 @@ export const useBuyMatchPopup = () => {
const subscribeToMatch = () => {
if (!selectedSubscription || !defaultCard) return
const item = getSubscriptionItem(selectedSubscription)
const item = selectedSubscription.originalObject
const buy = requests[selectedSubscription.type]
buy({ cardId: defaultCard.id, item }).then(
@ -152,9 +141,17 @@ export const useBuyMatchPopup = () => {
)
}
const onBuyClick = (e?: MouseEvent<HTMLButtonElement>) => {
if (defaultCard) {
subscribeToMatch()
} else {
goTo(Steps.CardSelection, e)
}
}
useEffect(() => {
if (match) {
fetchSubscriptions(match.sportType, match.id)
fetchSubscriptions(match)
}
}, [match, fetchSubscriptions])
@ -165,12 +162,14 @@ export const useBuyMatchPopup = () => {
goBack,
goTo,
match,
matchSubscriptions,
onBuyClick,
onPeriodSelect,
onSubscriptionSelect,
open: openPopup,
postPaymentHandler,
selectedPeriod,
selectedSubscription,
subscribeToMatch,
subscriptions,
}
}

@ -1,25 +0,0 @@
import { useCallback } from 'react'
import isEmpty from 'lodash/isEmpty'
import flatMap from 'lodash/flatMap'
import map from 'lodash/map'
import { useLexicsStore } from 'features/LexicsStore'
import type { MatchSubscriptions } from '../../types'
export const useLexicsFetcher = () => {
const { addLexicsConfig } = useLexicsStore()
const fetchLexics = useCallback((subscriptions: MatchSubscriptions) => {
const lexics = flatMap(
subscriptions,
(periodSubscriptions) => map(periodSubscriptions, ({ lexic }) => lexic),
)
if (!isEmpty(lexics)) {
addLexicsConfig(lexics)
}
return subscriptions
}, [addLexicsConfig])
return { fetchLexics }
}

@ -3,43 +3,60 @@ import {
useCallback,
} from 'react'
import find from 'lodash/find'
import isEmpty from 'lodash/isEmpty'
import first from 'lodash/first'
import { getSubscriptions } from 'requests'
import { SportTypes } from 'config'
import type { Match } from 'features/Matches'
import { useLexicsStore } from 'features/LexicsStore'
import type { MatchSubscriptions, MatchSubscription } from '../../types'
import { SubscriptionType } from '../../types'
import { transformSubsciptions } from '../helpers'
import { useLexicsFetcher } from './useLexicsFetcher'
const defaultSubscriptions: MatchSubscriptions = {
[SubscriptionType.Month]: [],
[SubscriptionType.Year]: [],
[SubscriptionType.PayPerView]: [],
}
export const useSubscriptions = () => {
const { fetchLexics } = useLexicsFetcher()
const { suffix } = useLexicsStore()
const [selectedPeriod, setSelectedPeriod] = useState(SubscriptionType.Month)
const [matchSubscriptions, setMatchSubscriptionsList] = useState(defaultSubscriptions)
const [selectedSubscription, setSelectedSubscription] = useState<MatchSubscription | null>(null)
const fetchSubscriptions = useCallback((sport: SportTypes, id: number) => {
getSubscriptions(sport, id)
.then(transformSubsciptions)
.then(fetchLexics)
.then(setMatchSubscriptionsList)
}, [fetchLexics])
const fetchSubscriptions = useCallback((match: Match) => {
getSubscriptions(match.sportType, match.id)
.then((subscriptions) => transformSubsciptions({
match,
subscriptions,
suffix,
}))
.then((subscriptions) => {
setMatchSubscriptionsList(subscriptions)
const firstSubscription = find(subscriptions, (subscription) => !isEmpty(subscription))
setSelectedPeriod(first(firstSubscription)?.type || SubscriptionType.Month)
})
}, [suffix])
const resetSubscriptions = useCallback(() => {
setSelectedPeriod(SubscriptionType.Month)
setSelectedSubscription(null)
setMatchSubscriptionsList(defaultSubscriptions)
}, [])
const onSubscriptionSelect = (subscription: MatchSubscription) => {
setSelectedSubscription(subscription === selectedSubscription ? null : subscription)
}
return {
fetchSubscriptions,
matchSubscriptions,
onPeriodSelect: setSelectedPeriod,
onSubscriptionSelect: setSelectedSubscription,
onSubscriptionSelect,
resetSubscriptions,
selectedPeriod,
selectedSubscription,

@ -1,37 +1,73 @@
import styled from 'styled-components/macro'
import styled, { css } from 'styled-components/macro'
import { devices } from 'config'
import { isMobileDevice } from 'config/userAgent'
import { Modal as BaseModal } from 'features/Modal'
import { ModalWindow } from 'features/Modal/styled'
import { ButtonSolid } from 'features/Common'
import { ModalWindow } from 'features/Modal/styled'
import { Modal as BaseModal } from 'features/Modal'
export const Modal = styled(BaseModal)`
background-color: rgba(0, 0, 0, 0.7);
${ModalWindow} {
min-width: 517px;
min-height: auto;
padding: 20px 0;
background-color: #3F3F3F;
padding: 0;
background-color: #333333;
border-radius: 5px;
@media ${devices.mobile} {
width: 100vw;
height: 100vh;
padding: 0;
}
${isMobileDevice
? css`
width: calc(100vw - 60px);
@media screen and (orientation: landscape){
max-width: calc(100vw - 80px);
height: calc(100vh - 60px);
overflow: auto;
}
`
: ''};
}
`
export const Header = styled.div`
display: flex;
justify-content: center;
padding: 0 40px;
`
export const HeaderTitle = styled.h2`
font-weight: 600;
font-size: 24px;
color: #FFFFFF;
text-align: center;
${isMobileDevice
? css`
font-size: 14px;
font-weight: 700;
`
: ''};
`
export const Button = styled(ButtonSolid)`
min-width: 142px;
min-width: 270px;
width: auto;
height: 50px;
padding: 0 20px;
background-color: #294FC4;
box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.3);
background-color: #294FC3;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
border-radius: 5px;
font-weight: 600;
font-size: 20px;
${isMobileDevice
? css`
height: 32px;
min-width: 117px;
font-size: 12px;
@media screen and (orientation: landscape){
min-width: 178px;
}
`
: ''};
:disabled {
opacity: 0.5;
@ -39,11 +75,38 @@ export const Button = styled(ButtonSolid)`
`
type WrapperProps = {
height?: number,
width?: number,
}
export const Wrapper = styled.div<WrapperProps>`
width: ${({ width }) => (width ? `${width}px` : '870px')};
position: relative;
height: ${({ height }) => (height ? `${height}px` : 'auto')};
width: ${({ width }) => (width ? `${width}px` : '830px')};
padding: 40px 0 41px;
${isMobileDevice
? css`
@media screen and (orientation: landscape){
padding: 17px 10px 15px;
width: 100%;
}
@media (max-width: 1370px) {
max-width: 743px;
max-height: 650px;
}
@media (max-width: 650px){
width: 100%;
padding: 40px 10px 20px;
display: flex;
flex-direction: column;
justify-content: space-evenly;
}
`
: ''};
`
type BodyProps = {
@ -54,8 +117,22 @@ type BodyProps = {
export const Body = styled.div<BodyProps>`
margin-top: ${({ marginTop }) => (marginTop ? `${marginTop}px` : '')};
margin-bottom: ${({ marginBottom }) => (marginBottom ? `${marginBottom}px` : '')};
margin-bottom: ${({ marginBottom }) => (
marginBottom ? `${marginBottom}px` : ''
)};
padding: ${({ padding }) => (padding || '')};
${isMobileDevice
? css`
margin-top: 0;
padding: 10px 0 0 0;
@media screen and (orientation: landscape){
margin-top: 0;
padding-top: 0;
}
`
: ''};
`
type FooterProps = {
@ -66,9 +143,18 @@ export const Footer = styled.div<FooterProps>`
width: 100%;
display: flex;
justify-content: center;
margin-top: 40px;
margin-top: ${({ marginTop }) => (marginTop ? `${marginTop}px` : '')};
margin-bottom: 15px;
@media (max-width: 1370px) {
margin-top: 15px;
}
${isMobileDevice
? css`
@media screen and (orientation: landscape){
margin-top: 10px;
}
`
: ''};
`
export const ResultText = styled.span`
@ -78,4 +164,15 @@ export const ResultText = styled.span`
font-weight: normal;
font-size: 20px;
line-height: 27px;
${isMobileDevice
? css`
font-size: 14px;
line-height: 18px;
/* margin-top: 10px; */
`
: ''};
`
export const SmallButton = styled(Button)`
min-width: 70px;
`

@ -1,3 +1,4 @@
import type { LexicsId, Values } from 'features/LexicsStore/types'
import type { SubscriptionResponse } from 'requests'
export enum Steps {
@ -9,11 +10,24 @@ export enum Steps {
export enum SubscriptionType {
Month = 'month',
PayPerView = 'pay_per_view',
Year = 'year',
}
export type MatchSubscription = SubscriptionResponse & {
type Desciption = {
lexic: LexicsId,
values: Values,
}
export type MatchSubscription = {
currency: string,
description: Desciption,
id: string,
name: string,
originalObject: SubscriptionResponse,
pass: string,
price: number,
seasonName?: string,
type: SubscriptionType,
}

@ -12,7 +12,13 @@ import { addCard } from 'requests/addCard'
import { deleteCard } from 'requests/deleteCard'
import { setDefaultCard as setDefaultCardRequest } from 'requests/setDefaultCard'
import { useToggle } from 'hooks'
export const useBankCards = () => {
const {
isOpen: infoModalOpen,
toggle: toggleInfoModal,
} = useToggle()
const [error, setError] = useState('')
const [cards, setCards] = useState<Cards | null>(null)
const defaultCard = useMemo(
@ -32,7 +38,10 @@ export const useBankCards = () => {
)
const onDeleteCard = (cardId: string) => {
deleteCard(cardId).then(fetchCards)
deleteCard(cardId).then(() => {
fetchCards()
toggleInfoModal()
})
}
const onSetDefaultCard = (cardId: string) => {
@ -44,8 +53,11 @@ export const useBankCards = () => {
defaultCard,
error,
fetchCards,
infoModalOpen,
onAddCard,
onDeleteCard,
onSetDefaultCard,
setError,
toggleInfoModal,
}
}

@ -16,6 +16,7 @@ import toLower from 'lodash/toLower'
import find from 'lodash/find'
import trim from 'lodash/trim'
import size from 'lodash/size'
import findIndex from 'lodash/findIndex'
import { useToggle } from 'hooks'
@ -28,6 +29,7 @@ const isOptionClicked = (target: HTMLElement | null) => (
)
export const useCombobox = <T extends Option>({
noSearch,
onBlur,
onChange,
onSelect,
@ -50,7 +52,7 @@ export const useCombobox = <T extends Option>({
toggle,
} = useToggle()
const filteredOptions = useMemo(() => (selected ? options : matchSort(
const filteredOptions = useMemo(() => (selected && noSearch ? options : matchSort(
options,
'name',
query,
@ -58,6 +60,7 @@ export const useCombobox = <T extends Option>({
options,
query,
selected,
noSearch,
])
const findOptionByName = useCallback((optionName: string) => (
@ -101,14 +104,9 @@ export const useCombobox = <T extends Option>({
}
useEffect(() => {
const lastElementIndex = size(filteredOptions) - 1
if (index < 0) setIndex(0)
if (index >= lastElementIndex) setIndex(lastElementIndex)
}, [
index,
options,
filteredOptions,
])
const selectedIndex = findIndex(filteredOptions, ({ name }) => name === query)
setIndex(selectedIndex)
}, [query, filteredOptions])
const onKeyDown = useCallback((event: KeyboardEvent<HTMLInputElement>) => {
onKeyDownScroll(event)
@ -116,9 +114,10 @@ export const useCombobox = <T extends Option>({
close()
inputFieldRef.current?.blur()
} else if (event.key === 'ArrowUp') {
setIndex(index - 1)
setIndex(index < 0 ? 0 : index - 1)
} else if (event.key === 'ArrowDown') {
setIndex(index + 1)
const lastElementIndex = size(filteredOptions) - 1
setIndex(index >= lastElementIndex ? lastElementIndex : index + 1)
} else if (event.key === 'Enter') {
onSelect?.(filteredOptions[index])
close()

@ -34,6 +34,7 @@ export const Combobox = <T extends Option>(props: Props<T>) => {
labelLexic,
labelWidth,
maxLength,
noSearch,
title,
withError,
} = props
@ -74,6 +75,7 @@ export const Combobox = <T extends Option>(props: Props<T>) => {
title={title}
value={query}
disabled={disabled}
readOnly={noSearch}
onChange={onQueryChange}
onKeyDown={onKeyDown}
placeholder={translate(labelLexic || '')}

@ -6,7 +6,7 @@ import type {
import type { CustomStyles } from 'features/Common'
export type Option = {
id: number,
id: number | string,
name: string,
}
@ -22,6 +22,7 @@ export type Props<T> = Pick<InputHTMLAttributes<HTMLInputElement>, (
labelLexic?: string,
labelWidth?: number,
maxLength?: number,
noSearch?: boolean,
onChange?: (event: ChangeEvent<HTMLInputElement>) => void,
onSelect?: (option: T | null) => void,
options: Array<T>,

@ -1,37 +0,0 @@
import styled from 'styled-components/macro'
const ArrowStyled = styled.button`
width: 40px;
height: 40px;
padding: 0;
border: 1px solid transparent;
border-radius: 50%;
background-color: transparent;
background-position: center;
outline: none;
z-index: 1;
position: absolute;
cursor: pointer;
:active {
background-color: rgba(117, 117, 117, 1);
}
:hover, :focus {
background-color: rgba(117, 117, 117, 0.5);
}
`
export const ArrowLeft = styled(ArrowStyled)`
background-image: url(/images/arrowLeft.svg);
top: 50%;
left: 0px;
transform: translate(-10px, -50%);
`
export const ArrowRight = styled(ArrowStyled)`
background-image: url(/images/arrowRight.svg);
top: 50%;
right: 0px;
transform: translate(10px, -50%);
`

@ -1,21 +0,0 @@
import { ArrowLeft, ArrowRight } from 'features/Common'
const Story = {
component: ArrowLeft,
title: 'Arrows',
}
export default Story
const backgroundStyles = {
backgroundColor: '#333',
height: '200px',
padding: '20px',
}
export const Group = () => (
<div style={backgroundStyles}>
<ArrowLeft />
<ArrowRight />
</div>
)

@ -1,19 +1,25 @@
import styled, { css } from 'styled-components/macro'
import { devices } from 'config/devices'
import { isMobileDevice } from 'config/userAgent'
const baseButtonStyles = css`
width: 272px;
height: 50px;
height: 2.36rem;
border-width: 0.7px;
border-style: solid;
border-radius: 2px;
padding: 0 12px;
padding: 0 0.567rem;
font-style: normal;
font-size: 20px;
font-size: 0.95rem;
outline-color: white;
cursor: pointer;
${isMobileDevice
? css`
height: 27px;
min-height: 27px;
font-size: 16px;
`
: ''};
:disabled {
opacity: 0.5;
@ -23,11 +29,11 @@ const baseButtonStyles = css`
export const outlineButtonStyles = css`
${baseButtonStyles}
padding-top: 8.6px;
padding-bottom: 10.6px;
color: ${({ theme: { colors } }) => colors.secondary};
padding-top: 0.42rem;
padding-bottom: 0.475rem;
color: ${({ theme: { colors } }) => colors.text100};
font-weight: normal;
border-color: ${({ theme: { colors } }) => colors.secondary};
border-color: ${({ theme: { colors } }) => colors.text100};
background: transparent;
`
@ -37,17 +43,14 @@ export const solidButtonStyles = css`
color: #fff;
font-weight: bold;
border-color: transparent;
background-color: #294FC4;
background-color: #294FC3;
box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.3);
/* TODO: удалить медиа запросы из стайледа,
добавить специфичные юз кейсу правила
через враппер компоненты или др способом
*/
@media ${devices.mobile} {
width: 335px;
height: 40px;
}
${isMobileDevice
? css`
height: 30px;
min-height: 30px;
`
: ''};
`
export const ButtonSolid = styled.button`

@ -8,7 +8,7 @@ export const Wrapper = styled.span.attrs(() => ({
export const Label = styled.label`
display: flex;
align-items: center;
color: ${({ theme: { colors } }) => colors.text};
color: ${({ theme: { colors } }) => colors.text100};
font-style: normal;
font-weight: bold;
font-size: 18px;

@ -51,7 +51,6 @@ export const Input = ({
onBlur,
onChange,
onFocus,
paddingX,
pattern,
required,
title,
@ -67,7 +66,7 @@ export const Input = ({
<Column isUserAccountPage={isUserAccountPage} className={className}>
<InputWrapper
wrapperWidth={wrapperWidth}
paddingX={paddingX}
hasRightIcon={editIcon}
error={error}
>
<Label>

@ -4,21 +4,22 @@ import isNil from 'lodash/isNil'
import { T9n } from 'features/T9n'
import { devices } from 'config/devices'
import { isMobileDevice } from 'config/userAgent'
export type WrapperProps = {
error?: string | null,
paddingX?: number,
hasRightIcon?: boolean,
wrapperWidth?: number,
}
export const wrapperStyles = css<WrapperProps>`
width: ${({ wrapperWidth }) => (wrapperWidth ? `${wrapperWidth}px` : '100%')};
height: 48px;
height: 2.2rem;
margin-top: 20px;
padding-left: ${({ paddingX = 24 }) => (paddingX ? `${paddingX}px` : '')};
padding-right: ${({ paddingX = 24 }) => (paddingX ? `${paddingX}px` : '')};
padding-top: 13px;
padding-bottom: 11px;
padding-left: 24px;
padding-right: ${({ hasRightIcon = 24 }) => (hasRightIcon ? '62px' : '24px')};
padding-top: 0.614rem;
padding-bottom: 0.519rem;
display: flex;
align-items: center;
background-color: #3F3F3F;
@ -37,6 +38,7 @@ export const Label = styled.label`
width: 100%;
display: flex;
`
export const LabelTitle = styled.p<TitleProps>`
font-style: normal;
font-weight: normal;
@ -51,7 +53,6 @@ export const LabelTitle = styled.p<TitleProps>`
@media ${devices.laptop} {
${({ isUserAccountPage }) => (!isUserAccountPage
? css`
display: none;
`
: '')}
}
@ -63,6 +64,13 @@ export const LabelTitle = styled.p<TitleProps>`
`
: '')}
}
${isMobileDevice
? css`
display: block;
padding-left: 10px;
font-size: 12px;
`
: ''};
`
type InputProps = {
@ -70,16 +78,16 @@ type InputProps = {
isUserAccountPage?: boolean,
}
export const inputStyles = css<InputProps>`
const inputStyles = css<InputProps>`
flex-grow: 1;
font-weight: bold;
font-weight: 600;
font-size: 20px;
line-height: 24px;
width: ${({ inputWidth }) => (inputWidth ? `${inputWidth}px` : '')};
background-color: transparent;
border: transparent;
margin-left: 24px;
color: ${({ theme: { colors } }) => colors.text};
color: ${({ theme: { colors } }) => colors.text100};
&[type='password'] {
letter-spacing: 6px;
@ -95,15 +103,14 @@ export const inputStyles = css<InputProps>`
:-webkit-autofill:focus,
:-webkit-autofill:active {
box-shadow: 0 0 0 30px #3F3F3F inset;
caret-color: ${({ theme: { colors } }) => colors.text};
-webkit-text-fill-color: ${({ theme: { colors } }) => colors.text};
}
@media ${devices.laptop} {
width: 100%;
font-size: 20px;
caret-color: ${({ theme: { colors } }) => colors.text100};
-webkit-text-fill-color: ${({ theme: { colors } }) => colors.text100};
}
${isMobileDevice
? css`
font-size: 12px;
`
: ''};
`
export const InputStyled = styled.input<InputProps>`
@ -111,61 +118,12 @@ export const InputStyled = styled.input<InputProps>`
::placeholder {
opacity: 0;
}
@media ${devices.laptop} {
::placeholder {
font-style: normal;
font-weight: normal;
white-space: nowrap;
font-size: 16px;
line-height: 24px;
letter-spacing: -0.01em;
margin-right: -10px;
}
${({ isUserAccountPage }) => (!isUserAccountPage
? css`
::placeholder {
opacity: 1;
}
`
: '')}
}
@media ${devices.tablet} {
${({ isUserAccountPage }) => (isUserAccountPage
? css`
::placeholder {
opacity: 1;
}
`
: '')}
}
@media ${devices.mobile} {
font-size: 14px;
margin-left: 0;
::placeholder {
font-size: 14px;
text-align: center;
}
}
`
export const InputWrapper = styled.div<WrapperProps>`
position: relative;
${wrapperStyles}
@media ${devices.mobile} {
height: 40px;
margin-top: 0;
position: relative;
}
`
type ColumnProps = {
isUserAccountPage?: boolean,
}
@ -189,11 +147,10 @@ export const Column = styled.div<ColumnProps>`
max-width: 415px;
`
: '')}
}
@media ${devices.mobile} {
width: 335px;
width: 100%;
position: relative;
}
`
@ -204,24 +161,28 @@ type ErrorProps = {
export const Error = styled(T9n)<ErrorProps>`
display: block;
min-height: 16px;
margin-top: 5px;
min-height: 0.75rem;
height: 0.95rem;
font-style: normal;
font-weight: normal;
font-size: 13px;
line-height: 16px;
font-size: 0.567rem;
line-height: 0.95rem;
letter-spacing: -0.078px;
color: #E64646;
color: ${({ theme }) => theme.colors.error};
${isMobileDevice
? css`
font-size: 7.38px;
line-height: 15px;
min-height: 15px;
margin-bottom: 0;
`
: ''}
${({ marginBottom }) => (
marginBottom
? `margin-bottom: ${marginBottom}px;`
? `margin-bottom: ${marginBottom}rem;`
: ''
)}
@media ${devices.mobile} {
margin-top: 0;
}
`
export const Icon = styled.div<{ image: string }>`
@ -235,4 +196,10 @@ export const Icon = styled.div<{ image: string }>`
background-size: 100%;
background-repeat: no-repeat;
cursor: pointer;
${isMobileDevice
? css`
width: 18px;
height: 18px;
`
: ''}
`

@ -0,0 +1,14 @@
import styled, { css } from 'styled-components/macro'
import { isMobileDevice } from 'config/userAgent'
export const InputGroup = styled.div`
width: 100%;
box-shadow: ${({ theme }) => theme.colors.shadow};
border-radius: 14px;
overflow: hidden;
${isMobileDevice
? css`
border-radius: 8px;
`
: ''};
`

@ -0,0 +1,55 @@
import type { InputHTMLAttributes, ReactNode } from 'react'
import { useLexicsStore } from 'features/LexicsStore'
import {
Wrapper,
InputStyled,
Label,
} from './styled'
type Props = Pick<InputHTMLAttributes<HTMLInputElement>, (
'className' |
'onBlur' |
'onChange' |
'onFocus' |
'type' |
'placeholder' |
'value'
)> & {
leftContent?: ReactNode,
placeholderLexic?: string,
rightContent?: ReactNode,
}
export const NewInput = ({
className,
leftContent,
onBlur,
onChange,
onFocus,
placeholder,
placeholderLexic = '',
rightContent,
type,
value,
}: Props) => {
const { translate } = useLexicsStore()
return (
<Wrapper className={className}>
<Label>
{leftContent}
<InputStyled
onBlur={onBlur}
onChange={onChange}
onFocus={onFocus}
placeholder={placeholder ?? translate(placeholderLexic)}
type={type}
value={value}
/>
{rightContent}
</Label>
</Wrapper>
)
}

@ -0,0 +1,84 @@
import styled, { css } from 'styled-components/macro'
import { isMobileDevice } from 'config/userAgent'
export const Wrapper = styled.div`
background-color: ${({ theme }) => theme.colors.inputs};
width: 100%;
height: 2.123rem;
${isMobileDevice
? css`
height: 30px;
min-height: 30px;
position: relative;
`
: ''};
:not(:last-child) {
border-bottom: 0.5px solid ${({ theme }) => theme.colors.black40};
}
`
export const Label = styled.label`
display: flex;
align-items: center;
height: 100%;
color: rgba(255, 255, 255, 0.5);
font-weight: normal;
font-size: 16px;
line-height: 20px;
letter-spacing: -0.01em;
${isMobileDevice
? css`
font-size: 12px;
`
: ''};
`
const resetStyles = css`
background-color: transparent;
border: none;
outline: none;
:-webkit-autofill,
:-webkit-autofill:hover,
:-webkit-autofill:focus,
:-webkit-autofill:active {
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: #fff;
caret-color: #fff;
font-size: 16px;
}
`
export const InputStyled = styled.input`
${resetStyles}
padding: 0 0.755rem;
flex-grow: 1;
height: 100%;
color: ${({ theme }) => theme.colors.text100};
::placeholder {
color: rgba(255, 255, 255, 0.5);
font-weight: normal;
width: 100%;
color: ${({ theme }) => theme.colors.text100};
font-style: normal;
font-weight: normal;
font-size: 0.755rem;
letter-spacing: 0.1px;
${isMobileDevice
? css`
font-size: 12.31px;
`
: ''}
}
${isMobileDevice
? css`
font-size: 12.31px;
padding: 0 30px 0 10px;
`
: ''};
font-weight: ${({ type }) => (type === 'password' ? 700 : 'normal')};
`

@ -0,0 +1,58 @@
import type { ComponentProps } from 'react'
import styled, { css } from 'styled-components/macro'
import { isMobileDevice } from 'config/userAgent'
import { useToggle } from 'hooks'
import { NewInput } from 'features/Common'
import { BaseButton } from 'features/PopupComponents'
const VisibilityButton = styled(BaseButton)`
width: 1.14rem;
height: 1.14rem;
background-image: url(/images/visibility.svg);
opacity: 0.4;
background-color: transparent;
border-radius: 0;
margin-right: 0.5rem;
${isMobileDevice
? css`
min-width: 13.55px;
height: 9.23px;
right: 5px;
top: 50%;
transform: translateY(-50%);
`
: ''};
`
type Props = ComponentProps<typeof NewInput>
export const PasswordInput = ({
className,
leftContent,
onBlur,
onChange,
onFocus,
placeholder,
placeholderLexic,
value,
}: Props) => {
const { isOpen: showPassword, toggle } = useToggle()
return (
<NewInput
className={className}
onBlur={onBlur}
onChange={onChange}
onFocus={onFocus}
placeholder={placeholder}
placeholderLexic={placeholderLexic}
value={value}
type={showPassword ? 'text' : 'password'}
leftContent={leftContent}
rightContent={<VisibilityButton type='button' onClick={toggle} />}
/>
)
}

@ -8,7 +8,7 @@ export const Wrapper = styled.span.attrs(() => ({
export const Label = styled.label`
display: flex;
align-items: center;
color: ${({ theme: { colors } }) => colors.text};
color: ${({ theme: { colors } }) => colors.text100};
font-style: normal;
font-weight: bold;
font-size: 18px;

@ -1,93 +0,0 @@
import styled, { css } from 'styled-components/macro'
import { devices } from 'config/devices'
export const RadioButtonGroup = styled.div.attrs({
role: 'group',
})`
height: 100%;
box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.3);
border-radius: 2px;
overflow: hidden;
`
type RadioButtonProps = {
buttonWidth?: number,
disabled?: boolean,
selected?: boolean,
upperCase?: boolean,
}
export const RadioButton = styled.button.attrs(({ selected }: RadioButtonProps) => ({
'aria-pressed': selected,
}))<RadioButtonProps>`
border: none;
outline: none;
height: 100%;
width: ${({ buttonWidth }) => (buttonWidth ? `${buttonWidth}px` : '')};
font-weight: 600;
font-size: 18px;
cursor: pointer;
${({ selected }) => (
selected
? css`
background-color: #666666;
color: #ffffff;
@media ${devices.tablet} {
:first-child {
background-color: #CC0000;
}
:nth-child(2){
background-color: #EACB6F;
color: #000;
}
:last-child {
background: transparent;
color: #ffffff;
border: 1px solid #fff;
}
}
`
: css`
background-color: #3F3F3F;
color: #999999;
:hover {
background-color: #484848;
}
`
)}
${({ upperCase }) => (
upperCase ? 'text-transform: uppercase;' : ''
)}
${({ disabled }) => (
disabled
&& css`
pointer-events: none;
opacity: 0.7;
`
)}
:not(:last-child) {
border-right: 1px solid #222222;
}
@media ${devices.tablet} {
width: 105px;
height: 30px;
font-size: 13px;
color: #fff;
background-color: rgba(153, 153, 153, 0.5);
border-right: 0;
margin-right: 10px;
:last-child {
margin-right: 0;
}
}
`

@ -1,22 +0,0 @@
type StarProps = {
fill: string,
}
export const StarIcon = ({ fill }: StarProps) => (
<svg width='20' height='19' viewBox='0 0 20 19' xmlns='http://www.w3.org/2000/svg'>
<g filter='url(#filter0_d)'>
<path d='M10 0L12.5814 5.44704L18.5595 6.21885L14.1767 10.3571L15.2901 16.2812L10 13.3917L4.70993 16.2812L5.82325 10.3571L1.44049 6.21885L7.41863 5.44704L10 0Z' fill={fill} />
</g>
<defs>
<filter id='filter0_d' x='0.44043' y='0' width='19.119' height='18.2812' filterUnits='userSpaceOnUse' colorInterpolationFilters='sRGB'>
<feFlood floodOpacity='0' result='BackgroundImageFix' />
<feColorMatrix in='SourceAlpha' type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0' />
<feOffset dy='1' />
<feGaussianBlur stdDeviation='0.5' />
<feColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0' />
<feBlend mode='normal' in2='BackgroundImageFix' result='effect1_dropShadow' />
<feBlend mode='normal' in='SourceGraphic' in2='effect1_dropShadow' result='shape' />
</filter>
</defs>
</svg>
)

@ -0,0 +1,86 @@
import styled, { css } from 'styled-components/macro'
import { isMobileDevice } from 'config/userAgent'
type TabProps = {
disabled?: boolean,
selected?: boolean,
upperCase?: boolean,
}
export const Tab = styled.button.attrs(({ selected }: TabProps) => ({
'aria-pressed': selected,
}))<TabProps>`
border: none;
outline: none;
height: 100%;
padding-top: 0.38rem;
padding-bottom: 0.27rem;
font-weight: 600;
font-size: 0.519rem;
line-height: 0.85rem;
letter-spacing: -0.1px;
text-transform: uppercase;
cursor: pointer;
${({ selected, theme }) => (
selected
? css`
background-color: #FFFFFF;
color: ${theme.colors.black};
`
: css`
background-color: transparent;
color: #FFFFFF;
:hover {
background-color: #484848;
}
`
)}
${({ upperCase }) => (
upperCase ? 'text-transform: uppercase;' : ''
)}
${({ disabled }) => (
disabled
&& css`
pointer-events: none;
opacity: 0.7;
`
)}
:not(:last-child) {
border-right: 1px solid #FFFFFF;
}
${isMobileDevice
? css`
font-size: 10px;
`
: ''};
`
type TabGroupProps = {
buttons: number,
}
export const TabsGroup = styled.div.attrs({
role: 'group',
})<TabGroupProps>`
width: 100%;
height: 100%;
box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.3);
overflow: hidden;
border: 1px solid #FFFFFF;
border-radius: 2px;
${Tab} {
width: ${({ buttons }) => 100 / buttons}%;
}
${isMobileDevice
? css`
height: 28px;
`
: ''};
`

@ -1,5 +1,4 @@
import { css } from 'styled-components/macro'
import { devices } from 'config/devices'
export const customScrollbar = css`
@ -25,8 +24,4 @@ export const customScrollbar = css`
::-webkit-scrollbar-corner {
background: transparent;
}
@media ${devices.tablet} {
background-color: #3F3F3F;
}
`

@ -1,11 +1,12 @@
export * from './Input'
export * from './NewInput'
export * from './PasswordInput'
export * from './InputGroup'
export * from './Button'
export * from './Radio'
export * from './Checkbox'
export * from './Arrows'
export * from './SportName'
export * from './StarIcon'
export * from './customScrollbar'
export * from './customStyles'
export * from './Image'
export * from './RadioButtons'
export * from './Tabs'

@ -1,24 +0,0 @@
import { Menu } from 'features/Menu'
import { LanguageSelect } from 'features/LanguageSelect'
import {
HeaderStyled,
HeaderGroup,
MenuWrapper,
} from 'features/ProfileHeader/styled'
import { Filters } from '../Filters'
export const DesktopHeader = () => (
<HeaderStyled>
<HeaderGroup>
<Filters />
</HeaderGroup>
<HeaderGroup>
<MenuWrapper>
<Menu />
</MenuWrapper>
<LanguageSelect />
</HeaderGroup>
</HeaderStyled>
)

@ -1,29 +0,0 @@
import { Fragment } from 'react'
import { SportTypeFilter } from '../SportTypeFilter'
import { SearchInput } from '../SearchInput'
import { GenderFilter } from '../GenderFilter'
import { ProfileFilter } from '../ProfileFilter'
import {
SportFilterWrapper,
FilterWrapper,
} from './styled'
export const Filters = () => (
<Fragment>
<FilterWrapper>
<SearchInput />
</FilterWrapper>
<SportFilterWrapper>
<SportTypeFilter />
</SportFilterWrapper>
<FilterWrapper>
<GenderFilter />
</FilterWrapper>
<FilterWrapper>
<ProfileFilter />
</FilterWrapper>
</Fragment>
)

@ -1,43 +0,0 @@
import styled from 'styled-components/macro'
import { devices } from 'config'
export const BaseWrapper = styled.div`
position: relative;
height: 48px;
margin-right: 16px;
display: flex;
`
export const SportFilterWrapper = styled(BaseWrapper)`
width: 173px;
@media ${devices.tablet} {
width: auto;
margin: 20px 14px 0 14px;
justify-content: center;
}
`
export const FilterWrapper = styled(BaseWrapper)`
width: auto;
@media ${devices.tablet} {
height: 30px;
margin: 20px 20vw 0 20vw;
justify-content: center;
}
`
export const SearchInput = styled.input`
width: 100%;
padding-left: 20px;
padding-right: 20px;
font-weight: bold;
font-size: 18px;
background-color: #3F3F3F;
color: #fff;
border: transparent;
border-color: transparent;
outline: none;
`

@ -1,34 +0,0 @@
import { Gender } from 'requests'
import { T9n } from 'features/T9n'
import {
RadioButtonGroup,
RadioButton,
} from 'features/Common'
import { useExtendedSearchStore } from 'features/ExtendedSearchPage/store'
export const GenderFilter = () => {
const {
onGenderChange,
selectedGender,
} = useExtendedSearchStore()
return (
<RadioButtonGroup>
<RadioButton
selected={selectedGender === Gender.MALE}
onClick={() => onGenderChange(Gender.MALE)}
buttonWidth={122}
>
<T9n t='gender_male_long' />
</RadioButton>
<RadioButton
selected={selectedGender === Gender.FEMALE}
onClick={() => onGenderChange(Gender.FEMALE)}
buttonWidth={122}
>
<T9n t='gender_female_long' />
</RadioButton>
</RadioButtonGroup>
)
}

@ -1,31 +0,0 @@
import { Fragment } from 'react'
import { Link } from 'react-router-dom'
import { PAGES } from 'config'
import { Logo } from 'features/Logo'
import { Menu } from 'features/Menu'
import {
HeaderMobileWrapper,
HeaderIconsWrapper,
IconFavWrapper,
} from 'features/HeaderMobile/styled'
import { Filters } from '../Filters'
export const MobileHeader = () => (
<Fragment>
<HeaderMobileWrapper>
<Link to={PAGES.home}>
<Logo width={52} height={12} />
</Link>
<HeaderIconsWrapper>
<IconFavWrapper />
<Menu />
</HeaderIconsWrapper>
</HeaderMobileWrapper>
<Filters />
</Fragment>
)

@ -1,42 +0,0 @@
import { ProfileTypes } from 'config'
import { T9n } from 'features/T9n'
import {
RadioButtonGroup,
RadioButton,
} from 'features/Common'
import { useExtendedSearchStore } from '../../store'
export const ProfileFilter = () => {
const {
onProfileChange,
selectedProfile,
} = useExtendedSearchStore()
return (
<RadioButtonGroup>
<RadioButton
selected={selectedProfile === ProfileTypes.TEAMS}
onClick={() => onProfileChange(ProfileTypes.TEAMS)}
buttonWidth={122}
>
<T9n t='team' />
</RadioButton>
<RadioButton
selected={selectedProfile === ProfileTypes.PLAYERS}
onClick={() => onProfileChange(ProfileTypes.PLAYERS)}
buttonWidth={122}
>
<T9n t='player' />
</RadioButton>
<RadioButton
selected={selectedProfile === ProfileTypes.TOURNAMENTS}
onClick={() => onProfileChange(ProfileTypes.TOURNAMENTS)}
buttonWidth={122}
>
<T9n t='tournament' />
</RadioButton>
</RadioButtonGroup>
)
}

@ -1,44 +0,0 @@
import { Fragment, memo } from 'react'
import { isEmpty } from 'lodash'
import { ProfileTypes } from 'config'
import type { NormalizedSearchResults } from 'features/Search/helpers'
import {
Title,
ResultsList,
} from '../../styled'
type Props = {
results: NormalizedSearchResults,
}
export const Results = memo(({ results }: Props) => {
const hasResults = (
!isEmpty(results.players)
|| !isEmpty(results.teams)
|| !isEmpty(results.tournaments)
)
if (hasResults) {
return (
<Fragment>
<Title t='search_results' />
<ResultsList
list={results.teams}
profileType={ProfileTypes.TEAMS}
/>
<ResultsList
list={results.players}
profileType={ProfileTypes.PLAYERS}
/>
<ResultsList
list={results.tournaments}
profileType={ProfileTypes.TOURNAMENTS}
/>
</Fragment>
)
}
return null
})

@ -1,54 +0,0 @@
import { Fragment } from 'react'
import styled from 'styled-components/macro'
import { Loader } from 'features/Loader'
import { useExtendedSearchStore } from 'features/ExtendedSearchPage/store'
export const LoaderWrapper = styled.div`
position: absolute;
top: 0;
background-color: rgba(129, 129, 129, 0.5);
width: 100%;
height: 100%;
box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.3);
border-radius: 2px;
display: flex;
align-items: center;
justify-content: center;
`
const Input = styled.input`
width: 100%;
padding-left: 20px;
padding-right: 20px;
font-weight: bold;
font-size: 18px;
background-color: #3F3F3F;
color: #fff;
border: transparent;
border-color: transparent;
outline: none;
`
export const SearchInput = () => {
const {
isFetching,
onQueryChange,
query,
} = useExtendedSearchStore()
return (
<Fragment>
<Input
role='search'
value={query}
onChange={onQueryChange}
/>
{isFetching && (
<LoaderWrapper>
<Loader color='#515151' />
</LoaderWrapper>
)}
</Fragment>
)
}

@ -1,17 +0,0 @@
import { SportTypeFilter as Filter } from 'features/SportTypeFilter'
import { useExtendedSearchStore } from '../../store'
export const SportTypeFilter = () => {
const {
onSportChange,
selectedSport,
} = useExtendedSearchStore()
return (
<Filter
selectedSportId={selectedSport}
onSelect={onSportChange}
onReset={() => onSportChange(null)}
/>
)
}

@ -1,31 +1 @@
import { MediaQuery } from 'features/MediaQuery'
import { UserFavorites } from 'features/UserFavorites'
import { MainWrapper } from 'features/MainWrapper'
import { MobileHeader } from './components/MobileHeader'
import { DesktopHeader } from './components/DesktopHeader'
import { Results } from './components/Results'
import { useExtendedSearchStore } from './store'
import { Main } from './styled'
export { ExtendedSearchStore } from './store'
export const ExtendedSearchPage = () => {
const { searchItems } = useExtendedSearchStore()
return (
<MainWrapper>
<MediaQuery minDevice='laptop'>
<DesktopHeader />
<UserFavorites />
</MediaQuery>
<MediaQuery maxDevice='tablet'>
<MobileHeader />
</MediaQuery>
<Main>
<Results results={searchItems} />
</Main>
</MainWrapper>
)
}

@ -8,9 +8,7 @@ import {
import trim from 'lodash/trim'
import size from 'lodash/size'
import { ProfileTypes, SportTypes } from 'config'
import { Gender } from 'requests'
import { ProfileTypes } from 'config'
import { MIN_CHARACTERS_LENGTH } from 'features/Search/config'
import type { NormalizedSearchResults } from 'features/Search/helpers'
@ -18,18 +16,15 @@ import type { NormalizedSearchResults } from 'features/Search/helpers'
import { useSearchRequest } from './useSearchRequest'
const initialState = {
players: [],
teams: [],
tournaments: [],
[ProfileTypes.PLAYERS]: [],
[ProfileTypes.TEAMS]: [],
[ProfileTypes.TOURNAMENTS]: [],
}
export const useExtendedSearch = () => {
const [searchItems, setSearchItems] = useState<NormalizedSearchResults>(initialState)
const [query, setQuery] = useState('')
const [selectedSport, setSelectedSport] = useState<SportTypes | null>(null)
const [selectedGender, setSelectedGender] = useState<Gender | null>(null)
const [selectedProfile, setSelectedProfile] = useState<ProfileTypes | null>(null)
const {
cancelSearch,
@ -44,30 +39,16 @@ export const useExtendedSearch = () => {
[],
)
const onGenderChange = useCallback((gender: Gender | null) => {
setSelectedGender((oldGender) => (gender === oldGender ? null : gender))
}, [])
const onProfileChange = useCallback((profile: ProfileTypes | null) => {
setSelectedProfile((oldProfile) => (profile === oldProfile ? null : profile))
}, [])
const clearQuery = () => setQuery('')
const trimmedQuery = trim(query)
useEffect(() => {
cancelSearch()
if (size(trimmedQuery) >= MIN_CHARACTERS_LENGTH) {
search({
gender: selectedGender,
profileType: selectedProfile,
query: trimmedQuery,
sportType: selectedSport,
})
search(trimmedQuery)
}
}, [
trimmedQuery,
selectedSport,
selectedGender,
selectedProfile,
search,
cancelSearch,
])
@ -75,22 +56,14 @@ export const useExtendedSearch = () => {
const reset = useCallback(() => {
setSearchItems(initialState)
setQuery('')
setSelectedSport(null)
setSelectedGender(null)
setSelectedProfile(null)
}, [])
return {
clearQuery,
isFetching,
onGenderChange,
onProfileChange,
onQueryChange,
onSportChange: setSelectedSport,
query,
reset,
searchItems,
selectedGender,
selectedProfile,
selectedSport,
}
}

@ -6,7 +6,7 @@ import {
import debounce from 'lodash/debounce'
import { extendedSearch } from 'requests'
import { getSearchItems } from 'requests'
import { useRequest } from 'hooks'
@ -15,7 +15,6 @@ import type { NormalizedSearchResults } from 'features/Search/helpers'
import { normalizeItems } from 'features/Search/helpers'
type Updater = (results: NormalizedSearchResults) => void
type SearchArgs = Omit<Parameters<typeof extendedSearch>[0], 'abortSignal'>
export const useSearchRequest = (updater: Updater) => {
const abortRef = useRef<AbortController | null>(null)
@ -23,15 +22,12 @@ export const useSearchRequest = (updater: Updater) => {
const {
isFetching,
request: searchItemsRequest,
} = useRequest(extendedSearch)
} = useRequest(getSearchItems)
const search = useMemo(
() => debounce((args: SearchArgs) => {
() => debounce((query: string) => {
const abortController = new AbortController()
searchItemsRequest({
abortSignal: abortController.signal,
...args,
}).then((searchResult) => {
searchItemsRequest(query, abortController.signal).then((searchResult) => {
abortRef.current = null
updater(normalizeItems(searchResult))
})

@ -1,41 +0,0 @@
import styled from 'styled-components/macro'
import { devices } from 'config'
import { T9n } from 'features/T9n'
import { ItemsList } from 'features/ItemsList'
import { GenderComponent, StyledLink } from 'features/ItemsList/styled'
export const Main = styled.main`
margin-top: 75px;
margin-bottom: 30px;
@media ${devices.tablet} {
margin-top: 30px;
}
`
export const Title = styled(T9n)`
display: block;
font-weight: bold;
font-size: 36px;
line-height: 24px;
color: #fff;
margin-bottom: 30px;
padding: 0 14px;
`
export const ResultsList = styled(ItemsList)`
${StyledLink} {
background-color: transparent;
:focus-within,
:hover {
background-color: rgba(153, 153, 153, 0.4);
}
}
${GenderComponent} {
display: none;
}
`

@ -5,21 +5,22 @@ export const GlobalStyles = createGlobalStyle`
box-sizing: border-box;
}
html {
font-size: calc(2px + 1vw);
}
body {
min-height: 100vh;
margin: 0;
padding: 0;
font-family: Montserrat, Tahoma, sans-serif;
font-size: 12px;
line-height: 12px;
color: #000;
background-color: #000;
}
h1, h2, h3, h4, h5, h6, p, ul, li {
margin: 0;
padding: 0;
font-size: 12px;
line-height: 12px;
}
ul, li {

@ -1,10 +1,13 @@
import startOfWeek from 'date-fns/startOfWeek'
import addDays from 'date-fns/addDays'
type Args = {
date: Date,
lang: string,
monthType?: 'long' | 'short',
}
export const getMonthName = ({
const getMonthName = ({
date,
lang,
monthType,
@ -25,3 +28,35 @@ export const getDisplayDate = ({
}),
year: date.getFullYear(),
})
const getWeekName = (date: Date, locale: string) => (
new Intl.DateTimeFormat(locale, { weekday: 'short' }).format(date)
)
const createDayGetter = (weekStart: Date, locale: string) => (day: number) => {
const dayDate = addDays(weekStart, day)
return {
date: dayDate,
name: getWeekName(dayDate, locale),
}
}
type Week = {
date: Date,
name: string,
}
export const getWeeks = (date: Date, locale: string) => {
const weekStart = startOfWeek(date, { weekStartsOn: 1 })
const getWeekDay = createDayGetter(weekStart, locale)
const week: Array<Week> = [
getWeekDay(0),
getWeekDay(1),
getWeekDay(2),
getWeekDay(3),
getWeekDay(4),
getWeekDay(5),
getWeekDay(6),
]
return week
}

@ -1,10 +1,14 @@
import type { MouseEvent } from 'react'
import { useMemo } from 'react'
import addDays from 'date-fns/addDays'
import { useToggle } from 'hooks'
import { useLexicsStore } from 'features/LexicsStore'
import { useHeaderFiltersStore } from 'features/HeaderFilters'
import { getDisplayDate } from '../helpers'
import { getDisplayDate, getWeeks } from '../helpers'
export const useDateFilter = () => {
const { selectedDate, setSelectedDate } = useHeaderFiltersStore()
@ -14,6 +18,10 @@ export const useDateFilter = () => {
isOpen,
open,
} = useToggle()
const week = useMemo(
() => getWeeks(selectedDate, lang),
[selectedDate, lang],
)
const date = getDisplayDate({
date: selectedDate,
@ -35,6 +43,11 @@ export const useDateFilter = () => {
}
}
const openDatePicker = (e: MouseEvent<HTMLButtonElement>) => {
e.stopPropagation()
open()
}
return {
close,
date,
@ -42,7 +55,9 @@ export const useDateFilter = () => {
onDateChange,
onNextClick,
onPreviousClick,
open,
onWeekDayClick: setSelectedDate,
openDatePicker,
selectedDate,
week,
}
}

@ -1,17 +1,22 @@
import map from 'lodash/map'
import { OutsideClick } from 'features/OutsideClick'
import { Date as DateIcon } from 'features/Icons/Date'
import { useDateFilter } from './hooks'
import { DatePicker } from '../DatePicker'
import {
Wrapper,
Button,
ArrowLeft,
ArrowRight,
MonthWrapper,
WeekDaysWrapper,
ArrowButton,
Arrow,
DateButton,
Day,
MonthYearWrapper,
Month,
Year,
MonthYear,
Week,
WeekDay,
WeekName,
WeekNumber,
} from './styled'
export const DateFilter = () => {
@ -22,39 +27,60 @@ export const DateFilter = () => {
onDateChange,
onNextClick,
onPreviousClick,
open,
onWeekDayClick,
openDatePicker,
selectedDate,
week,
} = useDateFilter()
return (
<Wrapper active={isOpen}>
<Button
onClick={onPreviousClick}
borderLeftRadius={2}
aria-label='Previous day'
>
<ArrowLeft />
</Button>
<OutsideClick onClick={close}>
<DateButton onClick={open}>
<Day>{date.day}</Day>
<MonthYearWrapper>
<Month>{date.month}</Month>
<Year>{date.year}</Year>
</MonthYearWrapper>
<Wrapper>
<MonthWrapper>
<MonthYear>
{date.month} {' '} {date.year}
</MonthYear>
<DateButton isActive={isOpen} onClick={openDatePicker}>
<DateIcon />
</DateButton>
<DatePicker
open={isOpen}
selected={selectedDate}
onChange={onDateChange}
/>
</OutsideClick>
<Button
onClick={onNextClick}
borderRightRadius={2}
aria-label='Next day'
>
<ArrowRight />
</Button>
</MonthWrapper>
<WeekDaysWrapper>
<ArrowButton
aria-label='Previous day'
onClick={onPreviousClick}
>
<Arrow direction='left' />
</ArrowButton>
<Week>
{
map(week, (day) => (
<WeekDay
selected={day.date.getDate() === selectedDate.getDate()}
onClick={() => onWeekDayClick(day.date)}
>
<WeekName>{day.name}</WeekName>
<WeekNumber>{day.date.getDate()}</WeekNumber>
</WeekDay>
))
}
</Week>
<ArrowButton
aria-label='Next day'
onClick={onNextClick}
>
<Arrow direction='right' />
</ArrowButton>
</WeekDaysWrapper>
{
isOpen && (
<OutsideClick onClick={close}>
<DatePicker
open
selected={selectedDate}
onChange={onDateChange}
/>
</OutsideClick>
)
}
</Wrapper>
)
}

@ -1,194 +1,203 @@
import styled from 'styled-components/macro'
import styled, { css } from 'styled-components/macro'
import { devices } from 'config/devices'
import { isMobileDevice } from 'config/userAgent'
import { devices } from 'config'
type Props = {
active: boolean,
}
export const BaseButton = styled.button`
border: none;
outline: none;
padding: 0;
background-color: transparent;
cursor: pointer;
`
export const Wrapper = styled.div<Props>`
export const Wrapper = styled.div`
position: relative;
height: 100%;
width: 100%;
width: 32.8rem;
display: flex;
box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.3);
flex-direction: column;
justify-content: center;
color: #656565;
@media ${devices.tablet} {
width: auto;
@media ${devices.mobile} {
width: 100%;
}
${({ active }) => (active
? `
& ${Button}, ${DateButton} {
color: #fff;
background-color: #666666;
}
${isMobileDevice
? css`
justify-content: flex-end;
padding-bottom: 6px;
width: auto;
`
: ''
)};
: ''};
`
export const DateButton = styled.button`
border: none;
outline: none;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
text-align: left;
width: 192px;
height: 100%;
border-left: 1px solid #222222;
border-right: 1px solid #222222;
cursor: pointer;
background-color: #3F3F3F;
color: #999999;
export const MonthWrapper = styled.div`
position: relative;
text-align: center;
`
@media ${devices.tablet} {
background-color: transparent;
color: #fff;
}
export const MonthYear = styled.span`
display: inline-block;
font-weight: 600;
font-size: 1.04rem;
line-height: 1.8rem;
text-transform: uppercase;
${isMobileDevice
? css`
font-size: 13px;
line-height: 24px;
`
: ''};
`
:hover {
background-color: #484848;
}
type DateButtonProps = {
isActive: boolean,
}
export const DateButton = styled(BaseButton)<DateButtonProps>`
position: absolute;
top: 0.2rem;
right: 3.6rem;
width: 1.3rem;
height: 1.26rem;
color: #fff;
opacity: 0.5;
:active {
color: #fff;
background-color: #666666;
:hover {
opacity: 0.7;
}
`
export const Day = styled.span`
font-weight: bold;
font-size: 38px;
letter-spacing: -0.03em;
${({ isActive }) => (
isActive
? 'opacity: 1;'
: ''
)}
@media ${devices.tablet} {
font-weight: 600;
font-size: 14px;
}
${isMobileDevice
? css`
right: 14px;
width: 16px;
height: 16px;
@media screen and (orientation: landscape){
right: 20px;
}
`
: ''};
`
export const Month = styled.span`
font-weight: bold;
font-size: 14px;
@media ${devices.tablet} {
font-weight: 600;
margin-right: 4px;
}
export const WeekDaysWrapper = styled.div`
display: flex;
justify-content: center;
align-items: center;
margin-top: 0.567rem;
${isMobileDevice
? css`
padding: 0 20px;
`
: ''};
`
export const MonthYearWrapper = styled.div`
height: 28px;
margin-left: 4px;
export const Week = styled.div`
margin: 0 0.95rem;
display: flex;
flex-direction: column;
justify-content: space-between;
@media ${devices.tablet} {
flex-direction: row;
align-items: center;
@media ${devices.mobile} {
width: 100%;
justify-content: space-between;
}
`
export const Year = styled.span`
font-style: normal;
font-weight: 300;
font-size: 14px;
type WeekDayProps = {
selected?: boolean,
}
export const WeekDay = styled(BaseButton)<WeekDayProps>`
width: 4rem;
display: flex;
flex-direction: column;
align-items: center;
color: #656565;
@media ${devices.tablet} {
font-weight: 600;
:hover {
color: #FFFFFF;
}
`
const Arrow = styled.div`
width: 16px;
height: 2px;
margin: auto;
background-color: #222222;
${({ selected }) => (
selected
? 'color: #FFFFFF;'
: ''
)};
@media ${devices.tablet} {
height: 0;
@media ${devices.mobile} {
width: 45px;
}
`
&::before {
content: '';
position: absolute;
width: 10px;
height: 10px;
border-left: 2px solid #222222;
border-bottom: 2px solid #222222;
}
export const WeekName = styled.span`
font-weight: bold;
font-size: 1.04rem;
line-height: 1.5rem;
${isMobileDevice
? css`
font-size: 14px;
line-height: 13px;
padding-top: 6px;
`
: ''};
`
export const ArrowLeft = styled(Arrow)`
&:before {
transform: rotate(45deg);
top: 19px;
left: 17px;
export const WeekNumber = styled.span`
font-weight: 600;
font-size: 1.3rem;
line-height: 1.8rem;
@media ${devices.tablet} {
top: 5px;
left: 8px;
}
@media ${devices.mobile} {
font-size: 16px;
line-height: 24px;
}
`
export const ArrowRight = styled(Arrow)`
&:before {
transform: rotate(225deg);
top: 19px;
right: 17px;
export const ArrowButton = styled(BaseButton)`
position: relative;
margin-top: 0.22rem;
width: 2.28rem;
height: 2.28rem;
${isMobileDevice
? css`
width: 15px;
height: 14px;
`
: ''};
@media ${devices.tablet} {
top: 5px;
right: 8px;
}
}
`
type ButtonProps = {
borderLeftRadius?: number,
borderRightRadius?: number,
type ArrowProps = {
direction: 'left' | 'right',
}
export const Button = styled.button<ButtonProps>`
position: relative;
outline: none;
border: none;
width: 48px;
height: 100%;
cursor: pointer;
background-color: #3F3F3F;
@media ${devices.tablet} {
border-radius: 50%;
width: 23px;
}
${({ borderLeftRadius }) => (
borderLeftRadius
? `
border-top-left-radius: ${borderLeftRadius}px;
border-bottom-left-radius: ${borderLeftRadius}px;
`
: ''
)}
${({ borderRightRadius }) => (
borderRightRadius
? `
border-top-right-radius: ${borderRightRadius}px;
border-bottom-right-radius: ${borderRightRadius}px;
`
: ''
export const Arrow = styled.span<ArrowProps>`
width: 0.65rem;
height: 0.65rem;
position: absolute;
border-left: 0.15rem solid #fff;
border-bottom: 0.15rem solid #fff;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
${({ direction }) => (
direction === 'left'
? 'transform: translate(-50%, -50%) rotate(45deg);'
: 'transform: translate(-50%, -50%) rotate(225deg);'
)}
:hover {
background-color: #484848;
}
:active {
background-color: #666666;
}
${isMobileDevice
? css`
border-left: 1px solid #fff;
border-bottom: 1pxrem solid #fff;
width: 10px;
height: 10px;
`
: ''};
`

@ -2,12 +2,12 @@ import type { ReactDatePickerProps } from 'react-datepicker'
import DatePickerComponent from 'react-datepicker'
import 'react-datepicker/dist/react-datepicker.css'
import addMonths from 'date-fns/addMonths'
import { useLexicsStore } from 'features/LexicsStore'
import { BodyBackdrop } from 'features/PageLayout'
import { getDisplayDate, getMonthName } from '../DateFilter/helpers'
import { getDisplayDate } from '../DateFilter/helpers'
import { useDatepickerLocales } from './hooks'
import { Arrow } from '../DateFilter/styled'
import {
Wrapper,
MonthsWrapper,
@ -20,33 +20,25 @@ type Args = (
& { lang: string }
)
const monthType = 'short'
const renderCustomHeader = ({
date,
decreaseMonth,
increaseMonth,
lang,
}: Args) => {
const prevMonth = getMonthName({
date: addMonths(date, -1),
lang,
monthType,
})
const nextMonth = getMonthName({
date: addMonths(date, 1),
lang,
monthType,
})
const currentDate = getDisplayDate({
date,
lang,
})
return (
<MonthsWrapper>
<MonthButton onClick={decreaseMonth}>{prevMonth}</MonthButton>
<MonthButton onClick={decreaseMonth}>
<Arrow direction='left' />
</MonthButton>
<CurrentMonth>{currentDate.month}, {currentDate.year}</CurrentMonth>
<MonthButton onClick={increaseMonth}>{nextMonth}</MonthButton>
<MonthButton onClick={increaseMonth}>
<Arrow direction='right' />
</MonthButton>
</MonthsWrapper>
)
}
@ -66,6 +58,7 @@ export const DatePicker = ({
useDatepickerLocales()
return (
<Wrapper>
<BodyBackdrop />
<DatePickerComponent
open={open}
selected={selected}

@ -1,48 +1,93 @@
import styled from 'styled-components/macro'
import styled, { css } from 'styled-components/macro'
import { isMobileDevice } from 'config/userAgent'
import { BaseButton } from '../DateFilter/styled'
export const Wrapper = styled.div`
position: absolute;
left: 0;
top: calc(100% + 14px);
top: calc(2.35rem);
right: 11rem;
z-index: 10;
${isMobileDevice
? css`
top: 50px;
right: -10%;
width: 100%;
@media screen and (orientation: landscape){
right: 15%;
}
`
: ''};
.react-datepicker {
margin: 0;
border: none;
width: 288px;
background-color: #666666;
box-shadow: 0px 2px 50px #000000;
width: 13.6rem;
background-color: #333333;
box-shadow: 0px 2px 2.32rem #000000;
border-radius: 2px;
font-family: inherit;
color: #fff;
${isMobileDevice
? css`
width: 80vw;
height: auto;
padding: 0 10px 15px;
@media screen and (orientation: landscape){
width: 50vw;
}
`
: ''};
}
.react-datepicker__header {
border: none;
border-radius: 2;
padding-top: 12px;
background-color: #666666;
padding-top: 0.567rem;
background-color: #333333;
}
.react-datepicker__month-container {
width: 100%;
${isMobileDevice
? css`
padding: 15px 0 0;
`
: ''};
}
.react-datepicker__day-names {
margin-top: 24px;
margin-bottom: 12px;
margin-top: 1.14rem;
margin-bottom: 0.567rem;
display: flex;
justify-content: space-around;
text-transform: capitalize;
${isMobileDevice
? css`
padding-bottom: 15px;
font-weight: 600;
`
: ''};
}
.react-datepicker__day-name {
margin: 0;
width: 28px;
width: 1.4rem;
color: inherit;
font-size: 16px;
line-height: 16px;
font-size: 0.75rem;
line-height: 0.75rem;
text-align: center;
letter-spacing: 0.1px;
${isMobileDevice
? css`
font-size: 16px;
line-height: 16px;
letter-spacing: 0.1px;
font-weight: 500;
`
: ''};
}
.react-datepicker__month {
@ -50,30 +95,51 @@ export const Wrapper = styled.div`
}
.react-datepicker__week {
margin: 8px 0;
margin: 0.38rem 0;
display: flex;
justify-content: space-around;
${isMobileDevice
? css`
height: 32px;
`
: ''};
}
.react-datepicker__day {
margin: 0;
border: none;
outline: none;
width: 28px;
height: 28px;
width: 1.4rem;
height: 1.4rem;
color: inherit;
opacity: 0.6;
font-weight: normal;
font-size: 12px;
font-size: 0.71rem;
line-height: 1.4rem;
border-radius: 50%;
${isMobileDevice
? css`
font-size: 16px;
line-height: 28px;
letter-spacing: 0.1px;
font-weight: 500;
width: 28px;
height: 28px;
text-align: center;
`
: ''};
:hover {
font-weight: 600;
color: #000000;
background-color: rgba(255, 255, 255, 0.4);
border-radius: 50%;
}
}
.react-datepicker__day--selected {
color: #005EDD;
font-weight: 600;
color: ${({ theme }) => theme.colors.button};
background-color: #ffffff;
opacity: 1;
}
@ -103,37 +169,39 @@ export const Wrapper = styled.div`
export const MonthsWrapper = styled.div`
width: 100%;
height: 28px;
padding: 0 12px;
height: 1.4rem;
display: flex;
align-items: center;
justify-content: space-between;
font-weight: 600;
font-size: 16px;
line-height: 16px;
font-size: 0.75rem;
line-height: 0.75rem;
text-align: center;
letter-spacing: 0.1px;
text-transform: capitalize;
${isMobileDevice
? css`
font-size: 16px;
line-height: 16px;
letter-spacing: 0.1px;
height: auto;
padding-bottom: 20px;
`
: ''};
`
export const CurrentMonth = styled.span`
min-width: 100px;
min-width: 4.65rem;
height: 100%;
padding: 0 14px;
padding: 0 0.65rem;
display: flex;
align-items: center;
justify-content: center;
background-color: #005EDD;
border-radius: 16px;
`
export const MonthButton = styled.button`
border: none;
outline: none;
padding: 0;
opacity: 0.4;
color: inherit;
background-color: transparent;
text-transform: inherit;
cursor: pointer;
export const MonthButton = styled(BaseButton)`
position: relative;
width: 1.89rem;
height: 1.89rem;
`

@ -1,45 +0,0 @@
import { T9n } from 'features/T9n'
import {
RadioButtonGroup,
RadioButton,
} from 'features/Common'
import { MatchStatuses, useHeaderFiltersStore } from '../../store'
export const MatchStatusFilter = () => {
const {
isTodaySelected,
selectedMatchStatus,
setSelectedMatchStatus,
} = useHeaderFiltersStore()
return (
<RadioButtonGroup>
<RadioButton
upperCase
selected={selectedMatchStatus === MatchStatuses.Live}
onClick={() => setSelectedMatchStatus(MatchStatuses.Live)}
buttonWidth={80}
disabled={!isTodaySelected}
>
<T9n t='match_status_live' />
</RadioButton>
<RadioButton
selected={selectedMatchStatus === MatchStatuses.Finished}
onClick={() => setSelectedMatchStatus(MatchStatuses.Finished)}
buttonWidth={121}
disabled={!isTodaySelected}
>
<T9n t='match_status_finished' />
</RadioButton>
<RadioButton
selected={selectedMatchStatus === MatchStatuses.Soon}
onClick={() => setSelectedMatchStatus(MatchStatuses.Soon)}
buttonWidth={87}
disabled={!isTodaySelected}
>
<T9n t='match_status_soon' />
</RadioButton>
</RadioButtonGroup>
)
}

@ -1,63 +0,0 @@
import { css } from 'styled-components/macro'
import { devices } from 'config'
import { useHeaderFiltersStore } from 'features/HeaderFilters/store'
import { SportTypeFilter as Filter } from 'features/SportTypeFilter'
import { DropdownButton } from '../TournamentFilter/styled'
const wrapperStyles = css`
width: 50%;
border-right: 1px solid #222222;
@media ${devices.tablet} {
border-right: 0;
}
${DropdownButton} {
border-radius: 0;
border-top-left-radius: 2px;
border-bottom-left-radius: 2px;
}
`
const useSportTypeFilter = () => {
const {
selectedSportTypeId,
setSelectedSportTypeId,
setSelectedTournamentId,
} = useHeaderFiltersStore()
const onSelect = (id: number) => {
setSelectedSportTypeId(id)
setSelectedTournamentId(null)
}
const onReset = () => {
setSelectedSportTypeId(null)
setSelectedTournamentId(null)
}
return {
onReset,
onSelect,
selectedSportTypeId,
}
}
export const SportTypeFilter = () => {
const {
onReset,
onSelect,
selectedSportTypeId,
} = useSportTypeFilter()
return (
<Filter
selectedSportId={selectedSportTypeId}
onSelect={onSelect}
onReset={onReset}
wrapperStyles={wrapperStyles}
/>
)
}

@ -1,81 +0,0 @@
import type { MouseEvent } from 'react'
import { useEffect, useState } from 'react'
import find from 'lodash/find'
import type { Tournaments } from 'requests'
import { getSportTournaments } from 'requests'
import { useRequest, useToggle } from 'hooks'
import { useHeaderFiltersStore } from 'features/HeaderFilters'
const findTournament = (tournaments: Tournaments, id: number) => {
const tournament = find(tournaments, { id })
if (!tournament) return null
return {
...tournament,
name_eng: tournament.short_name_eng || tournament.name_eng,
name_rus: tournament.short_name_rus || tournament.name_rus,
}
}
export const useTournamentFilter = () => {
const [tournaments, setTournaments] = useState<Tournaments>([])
const {
selectedSportTypeId,
selectedTournamentId,
setSelectedTournamentId,
} = useHeaderFiltersStore()
const {
close,
isOpen,
open,
} = useToggle()
const {
isFetching,
request: requestTournaments,
} = useRequest(getSportTournaments)
const [page, setPage] = useState(0)
useEffect(() => {
setTournaments([])
requestTournaments(selectedSportTypeId, 0).then((newTournaments) => {
setTournaments(newTournaments)
setPage(1)
})
}, [selectedSportTypeId, requestTournaments])
const fetchMore = async () => {
if (isFetching) return
const newTournaments = await requestTournaments(selectedSportTypeId, page)
setTournaments([...tournaments, ...newTournaments])
setPage(page + 1)
}
const selectedTournament = selectedTournamentId
? findTournament(tournaments, selectedTournamentId)
: null
const onTournamentSelect = (tournamentId: number) => {
setSelectedTournamentId(tournamentId)
close()
}
const onResetSelectedTournament = (e: MouseEvent<HTMLButtonElement>) => {
e.stopPropagation()
setSelectedTournamentId(null)
}
return {
close,
fetchMore,
isOpen,
onResetSelectedTournament,
onTournamentSelect,
open,
selectedTournament,
tournaments,
}
}

@ -1,63 +0,0 @@
import { T9n } from 'features/T9n'
import { Name } from 'features/Name'
import { OutsideClick } from 'features/OutsideClick'
import { TournamentList } from '../TournamentList'
import { useTournamentFilter } from './hooks'
import {
Wrapper,
InfiniteScroll,
DropdownButton,
ButtonTitle,
Arrows,
ClearButton,
} from './styled'
export const TournamentFilter = () => {
const {
close,
fetchMore,
isOpen,
onResetSelectedTournament,
onTournamentSelect,
open,
selectedTournament,
tournaments,
} = useTournamentFilter()
return (
<Wrapper>
<DropdownButton
onClick={open}
active={isOpen}
aria-expanded={isOpen}
aria-controls='tournamentsList'
>
<ButtonTitle>
{
selectedTournament
? <Name nameObj={selectedTournament} />
: <T9n t='tournament' />
}
</ButtonTitle>
{
selectedTournament && (
<ClearButton onClick={onResetSelectedTournament} />
)
}
<Arrows active={isOpen} />
</DropdownButton>
{
isOpen && (
<OutsideClick onClick={close}>
<InfiniteScroll onFetchMore={fetchMore}>
<TournamentList
tournaments={tournaments}
onSelect={onTournamentSelect}
/>
</InfiniteScroll>
</OutsideClick>
)
}
</Wrapper>
)
}

@ -1,134 +0,0 @@
import styled from 'styled-components/macro'
import { devices } from 'config/devices'
import { customScrollbar } from 'features/Common'
import { InfiniteScroll as InfiniteScrollBase } from 'features/InfiniteScroll'
export const InfiniteScroll = styled(InfiniteScrollBase)`
position: absolute;
left: 0;
top: calc(100% + 8px);
width: 448px;
height: 456px;
overflow-y: scroll;
z-index: 2;
@media ${devices.laptop} {
right: 0;
bottom: -1px;
left: auto;
}
@media ${devices.tablet} {
width: 100%;
left: 0;
top: calc(-92vh + 36px);
height: calc(92vh - 36px);
}
@media ${devices.mobile} {
width: 200%;
left: -100%;
}
${customScrollbar}
`
type Props = {
active?: boolean,
}
export const DropdownButton = styled.button<Props>`
position: relative;
height: 100%;
width: 100%;
padding-right: 45px;
outline: none;
border: none;
border-radius: 2px;
display: flex;
align-items: center;
background-color: #3F3F3F;
font-weight: 600;
font-size: 18px;
cursor: pointer;
background-size: 12px 12px;
background-repeat: no-repeat;
background-position: 113px;
@media ${devices.tablet} {
background: transparent;
font-weight: 500;
font-size: 14px;
}
${({ active }) => (
active
? `
background-color: #666666;
color: #fff;
`
: `
color: #999999;
:hover {
background-color: #484848;
}
`
)}
`
export const ButtonTitle = styled.span`
display: inline-block;
flex-grow: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
line-height: normal;
text-transform: capitalize;
`
export const Arrows = styled.span<Props>`
position: absolute;
right: 19px;
display: inline-block;
width: 12px;
height: 12px;
background-repeat: no-repeat;
background-position: center;
@media ${devices.tablet} {
display: none;
}
${({ active }) => (
active
? 'background-image: url(/images/arrowUp.svg);'
: 'background-image: url(/images/arrowDown.svg);'
)}
`
export const Wrapper = styled.div`
height: 100%;
width: 50%;
position: relative;
${DropdownButton} {
border-radius: 0;
border-top-right-radius: 2px;
border-bottom-right-radius: 2px;
}
`
export const ClearButton = styled.span`
display: inline-block;
cursor: pointer;
min-width: 10px;
height: 10px;
margin-left: 10px;
background-color: transparent;
background-image: url(/images/clear.svg);
background-position: center;
background-repeat: no-repeat;
`

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save