tf-checkout-react 1.6.6-beta.3 → 1.6.6-beta.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/README.md +61 -40
  2. package/dist/adapters/customFields.d.ts +1 -0
  3. package/dist/api/checkout.d.ts +1 -0
  4. package/dist/api/common.d.ts +1 -0
  5. package/dist/api/index.d.ts +1 -0
  6. package/dist/api/preRegistrationComplete.d.ts +1 -1
  7. package/dist/components/addonsContainer/AddonComponent.d.ts +5 -1
  8. package/dist/components/addonsContainer/SimpleAddonsContainer.d.ts +17 -0
  9. package/dist/components/addonsContainer/index.d.ts +5 -1
  10. package/dist/components/billing-info-container/index.d.ts +8 -1
  11. package/dist/components/billing-info-container/utils.d.ts +25 -1
  12. package/dist/components/common/DatePickerField.d.ts +7 -1
  13. package/dist/components/countdown/index.d.ts +1 -1
  14. package/dist/components/forgotPasswordModal/index.d.ts +2 -1
  15. package/dist/components/myTicketsContainer/index.d.ts +3 -2
  16. package/dist/components/orderDetailsContainer/index.d.ts +7 -1
  17. package/dist/components/paymentContainer/OrderDetails.d.ts +8 -0
  18. package/dist/components/paymentContainer/handlePayment.d.ts +15 -0
  19. package/dist/components/paymentContainer/index.d.ts +10 -5
  20. package/dist/components/preRegistration/FieldsSection.d.ts +7 -1
  21. package/dist/components/preRegistration/PreRegistrationComplete.d.ts +6 -0
  22. package/dist/components/preRegistration/constants.d.ts +2 -2
  23. package/dist/components/preRegistration/index.d.ts +6 -0
  24. package/dist/components/resetPasswordContainer/index.d.ts +2 -2
  25. package/dist/components/stripePayment/index.d.ts +18 -3
  26. package/dist/components/ticketsContainer/InfoIcon.d.ts +5 -0
  27. package/dist/components/ticketsContainer/TicketsSection.d.ts +3 -2
  28. package/dist/components/ticketsContainer/TimeSlotsSection.d.ts +25 -0
  29. package/dist/components/ticketsContainer/index.d.ts +18 -5
  30. package/dist/components/timerWidget/index.d.ts +2 -1
  31. package/dist/constants/index.d.ts +5 -0
  32. package/dist/index.d.ts +4 -1
  33. package/dist/tf-checkout-react.cjs.development.js +5196 -3599
  34. package/dist/tf-checkout-react.cjs.development.js.map +1 -1
  35. package/dist/tf-checkout-react.cjs.production.min.js +1 -1
  36. package/dist/tf-checkout-react.cjs.production.min.js.map +1 -1
  37. package/dist/tf-checkout-react.esm.js +5199 -3605
  38. package/dist/tf-checkout-react.esm.js.map +1 -1
  39. package/dist/tf-checkout-styles.css +1 -1
  40. package/dist/types/add_on.d.ts +1 -0
  41. package/dist/types/checkoutPageConfigs.d.ts +1 -1
  42. package/dist/types/order-data.d.ts +2 -1
  43. package/dist/utils/auth.d.ts +8 -0
  44. package/dist/utils/customFields.d.ts +11 -0
  45. package/dist/utils/getDomain.d.ts +1 -1
  46. package/dist/utils/index.d.ts +1 -1
  47. package/dist/utils/setConfigs.d.ts +1 -0
  48. package/package.json +3 -2
  49. package/src/adapters/customFields.ts +7 -1
  50. package/src/api/auth.ts +2 -1
  51. package/src/api/checkout.ts +8 -4
  52. package/src/api/common.ts +49 -2
  53. package/src/api/interceptors.ts +7 -23
  54. package/src/api/preRegistrationComplete.ts +1 -1
  55. package/src/api/publicRequest.ts +10 -0
  56. package/src/components/addonsContainer/AddonComponent.tsx +71 -11
  57. package/src/components/addonsContainer/SimpleAddonsContainer.tsx +388 -0
  58. package/src/components/addonsContainer/index.tsx +189 -58
  59. package/src/components/billing-info-container/index.tsx +704 -390
  60. package/src/components/billing-info-container/{utils.ts → utils.tsx} +119 -0
  61. package/src/components/common/CheckboxField/index.tsx +1 -1
  62. package/src/components/common/DatePickerField.tsx +25 -10
  63. package/src/components/common/SnackbarAlert.tsx +32 -34
  64. package/src/components/confirmationContainer/index.tsx +1 -1
  65. package/src/components/countdown/index.tsx +22 -22
  66. package/src/components/delegationsContainer/IssueComponent.tsx +2 -1
  67. package/src/components/forgotPasswordModal/index.tsx +44 -13
  68. package/src/components/loginForm/index.tsx +1 -1
  69. package/src/components/loginModal/index.tsx +2 -2
  70. package/src/components/loginModal/style.css +3 -1
  71. package/src/components/myTicketsContainer/index.tsx +13 -9
  72. package/src/components/orderDetailsContainer/index.tsx +188 -173
  73. package/src/components/paymentContainer/OrderDetails.tsx +170 -0
  74. package/src/components/paymentContainer/handlePayment.ts +86 -0
  75. package/src/components/paymentContainer/index.tsx +253 -226
  76. package/src/components/paymentContainer/style.css +113 -0
  77. package/src/components/preRegistration/FieldsSection.tsx +8 -0
  78. package/src/components/preRegistration/PreRegistrationComplete.tsx +128 -118
  79. package/src/components/preRegistration/PreRegistrationInformations.tsx +21 -15
  80. package/src/components/preRegistration/constants.tsx +10 -4
  81. package/src/components/preRegistration/index.tsx +194 -174
  82. package/src/components/registerForm/constants.tsx +3 -1
  83. package/src/components/registerForm/index.tsx +3 -3
  84. package/src/components/resetPasswordContainer/index.tsx +12 -13
  85. package/src/components/seatMapContainer/TicketsSection.tsx +2 -2
  86. package/src/components/stripePayment/index.tsx +129 -24
  87. package/src/components/ticketsContainer/InfoIcon.tsx +35 -0
  88. package/src/components/ticketsContainer/PromoCodeSection.tsx +34 -28
  89. package/src/components/ticketsContainer/TicketRow.tsx +1 -1
  90. package/src/components/ticketsContainer/TicketsSection.tsx +178 -52
  91. package/src/components/ticketsContainer/TimeSlotsSection.tsx +120 -0
  92. package/src/components/ticketsContainer/index.tsx +209 -99
  93. package/src/components/timerWidget/index.tsx +15 -3
  94. package/src/constants/index.ts +2 -0
  95. package/src/hoc/CustomFields/index.tsx +9 -1
  96. package/src/index.ts +7 -2
  97. package/src/types/add_on.ts +1 -0
  98. package/src/types/api/common.d.ts +27 -0
  99. package/src/types/api/orders.d.ts +19 -3
  100. package/src/types/api/payment.d.ts +5 -2
  101. package/src/types/api/preRegistrationComplete.d.ts +2 -2
  102. package/src/types/checkoutPageConfigs.ts +1 -1
  103. package/src/types/order-data.ts +2 -1
  104. package/src/types/pre-registration-complete.d.ts +6 -1
  105. package/src/utils/auth.ts +32 -0
  106. package/src/utils/cookies.ts +42 -11
  107. package/src/utils/customFields.ts +22 -0
  108. package/src/utils/getDomain.ts +10 -4
  109. package/src/utils/index.ts +1 -1
  110. package/src/utils/setConfigs.ts +3 -1
@@ -52,4 +52,117 @@
52
52
 
53
53
  .payment_page .payment_plan .payment_plan_highlight {
54
54
  font-weight: bold;
55
+ }
56
+
57
+
58
+ /* Default styles - mobile section is hidden on desktop */
59
+ .mobile-order-summary {
60
+ display: none;
61
+ }
62
+
63
+ /* Mobile-specific styles */
64
+ @media (max-width: 767px) {
65
+ /* Show mobile summary on mobile devices */
66
+ .mobile-order-summary {
67
+ display: block;
68
+ margin-bottom: 15px;
69
+ background-color: #f8f8f8;
70
+ border-radius: 8px;
71
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
72
+ }
73
+
74
+ .mobile-order-summary-content {
75
+ display: flex;
76
+ align-items: flex-start;
77
+ padding: 15px;
78
+ cursor: pointer;
79
+ }
80
+
81
+ .mobile-order-info-container:after {
82
+ display: inline-block;
83
+ content: "⌃";
84
+ font-weight: 900;
85
+ font-size: 15px;
86
+ top: -2px;
87
+ left: 6px;
88
+ float: right;
89
+ position: relative;
90
+ transform: rotate(180deg);
91
+ transition: transform 0.25s, top 0.25s;
92
+ }
93
+
94
+ .mobile-order-info-container.open:after {
95
+ top: 2px;
96
+ transform: rotate(0deg);
97
+ }
98
+
99
+ .mobile-order-info-container.order-info-container-left {
100
+ text-align: left;
101
+ }
102
+ .mobile-order-info-container.order-info-container-right {
103
+ text-align: right;
104
+ }
105
+
106
+
107
+ .mobile-order-icon {
108
+ margin-right: 15px;
109
+ color: #1976d2;
110
+ padding-top: 2px;
111
+ }
112
+
113
+ .mobile-order-info {
114
+ flex: 1;
115
+ }
116
+
117
+ .mobile-order-text {
118
+ font-size: 14px;
119
+ color: #666;
120
+ margin-bottom: 4px;
121
+ }
122
+
123
+ .mobile-order-total {
124
+ font-size: 18px;
125
+ font-weight: bold;
126
+ color: #333;
127
+ margin-bottom: 8px;
128
+ }
129
+
130
+ .mobile-order-timer {
131
+ display: flex;
132
+ align-items: center;
133
+ margin-top: 8px;
134
+ padding-top: 8px;
135
+ border-top: 1px dashed #ddd;
136
+ }
137
+
138
+ .mobile-timer-icon {
139
+ margin-right: 8px;
140
+ color: #f44336;
141
+ }
142
+
143
+ .mobile-timer-text {
144
+ font-size: 13px;
145
+ color: #666;
146
+ }
147
+
148
+ .mobile-timer-countdown {
149
+ font-weight: bold;
150
+ color: #f44336;
151
+ }
152
+
153
+ .mobile-order-expand {
154
+ color: #666;
155
+ padding-top: 2px;
156
+ }
157
+
158
+ /* Hide the original content when collapsed on mobile */
159
+ .order_info_section.collapsed {
160
+ display: none !important;
161
+ }
162
+
163
+ /* Show the original content when expanded on mobile */
164
+ .order_info_section.expanded {
165
+ display: grid !important;
166
+ margin-top: 10px;
167
+ }
55
168
  }
@@ -11,6 +11,8 @@ import {
11
11
  } from '../common'
12
12
  import { DatePickerField } from '../common/DatePickerField'
13
13
  import { getValidateFunctions } from './utils'
14
+ import {ThemeOptions} from "@mui/material";
15
+ import {CSSProperties} from "@mui/styles";
14
16
 
15
17
  const isDocumentDefined = typeof document !== 'undefined'
16
18
 
@@ -25,6 +27,10 @@ export interface IFieldsSectionProps {
25
27
 
26
28
  countries?: { [key: string]: string | number }[];
27
29
  theme?: 'dark' | 'light';
30
+ themeOptions?: ThemeOptions & {
31
+ input?: CSSProperties;
32
+ checkbox?: CSSProperties;
33
+ };
28
34
  containerClass?: string;
29
35
  }
30
36
 
@@ -66,6 +72,7 @@ export const FieldsSection = ({
66
72
  setFieldValue,
67
73
  theme,
68
74
  containerClass = '',
75
+ themeOptions,
69
76
  }: IFieldsSectionProps) => (
70
77
  <>
71
78
  {_map(formFields, (item, index) => {
@@ -129,6 +136,7 @@ export const FieldsSection = ({
129
136
  }
130
137
  selectOptions={name === 'country' ? countries : options}
131
138
  theme={theme}
139
+ themeOptions={themeOptions}
132
140
  />
133
141
  </div>
134
142
  )
@@ -1,3 +1,6 @@
1
+ import { ThemeOptions } from '@mui/material'
2
+ import { createTheme, ThemeProvider } from '@mui/material/styles'
3
+ import { CSSProperties } from '@mui/styles'
1
4
  import axios, { AxiosError } from 'axios'
2
5
  import _get from 'lodash/get'
3
6
  import _identity from 'lodash/identity'
@@ -5,7 +8,7 @@ import _isEmpaty from 'lodash/isEmpty'
5
8
  import React, { FC, useEffect, useState } from 'react'
6
9
 
7
10
  import {
8
- getPreRegistrationInfluancers,
11
+ getPreRegistrationInfluencers,
9
12
  getPreRegistrationShareOptions,
10
13
  } from '../../api/preRegistrationComplete'
11
14
  import { X_TF_ECOMMERCE } from '../../constants'
@@ -22,6 +25,10 @@ const isWindowDefined = typeof window !== 'undefined'
22
25
  export const PreRegistrationComplete: FC<
23
26
  IPreRegistrationCompleteProps & {
24
27
  onGetConfirmationDataError?: (error: AxiosError) => void;
28
+ themeOptions?: ThemeOptions & {
29
+ input?: CSSProperties;
30
+ checkbox?: CSSProperties;
31
+ };
25
32
  }
26
33
  > = ({
27
34
  eventId: pEventId,
@@ -34,131 +41,134 @@ export const PreRegistrationComplete: FC<
34
41
  pageMessage = 'Pre registration was successful!',
35
42
  onLoginSuccess = _identity,
36
43
  logo,
44
+ themeOptions,
37
45
  }) => {
38
- const localStorageHash = isWindowDefined
39
- ? localStorage.getItem('pre-registration-hash')
40
- : ''
41
- const queryHash = getQueryVariable('hash') || ''
42
- queryHash &&
43
- isWindowDefined &&
44
- window.localStorage.setItem('pre-registration-hash', queryHash)
45
- const hash = queryHash || localStorageHash
46
- const [isLoggedIn, setIsLoggedIn] = useState(Boolean(getCookieByName(X_TF_ECOMMERCE)))
47
- const [showModalLogin, setShowModalLogin] = useState(!isLoggedIn)
48
- const [showCopyModal, setShowCopyModal] = useState(false)
49
- const [prizes, setPrizes] = useState([] as Array<IPrizeData>)
50
- const [shareOptions, setShareOptions] = useState({} as IShareOptionsData)
51
- const [shareActionData, setShareActionData] = useState(
52
- {} as ISubmitShareActionAttributes
53
- )
54
- const [error, setError] = useState({} as AxiosError)
55
- useCookieListener(X_TF_ECOMMERCE, value => setIsLoggedIn(Boolean(value)))
56
- useEffect(() => {
57
- const fetchConfirmationData = async () => {
58
- try {
59
- if (hash && isLoggedIn) {
60
- const shareOptionsData = await getPreRegistrationShareOptions({
61
- hash,
62
- })
63
- const { attributes } = shareOptionsData.data
64
- setShareOptions(shareOptionsData.data)
65
- setShareActionData({
66
- shareActionToken: attributes.shareActionToken,
67
- tokenShuffleMethod: attributes.tokenShuffleMethod,
68
- })
69
- const eventId = _get(shareOptionsData, 'data.attributes.eventId')
70
- if (eventId || pEventId) {
71
- const influencersData = await getPreRegistrationInfluancers({
72
- eventId: eventId || pEventId,
46
+ const themeMui = createTheme(themeOptions)
47
+
48
+ const localStorageHash = isWindowDefined
49
+ ? localStorage.getItem('pre-registration-hash')
50
+ : ''
51
+ const queryHash = getQueryVariable('hash') || ''
52
+ queryHash &&
53
+ isWindowDefined &&
54
+ window.localStorage.setItem('pre-registration-hash', queryHash)
55
+ const hash = queryHash || localStorageHash
56
+ const [isLoggedIn, setIsLoggedIn] = useState(Boolean(getCookieByName(X_TF_ECOMMERCE)))
57
+ const [showModalLogin, setShowModalLogin] = useState(!isLoggedIn)
58
+ const [showCopyModal, setShowCopyModal] = useState(false)
59
+ const [prizes, setPrizes] = useState([] as Array<IPrizeData>)
60
+ const [shareOptions, setShareOptions] = useState({} as IShareOptionsData)
61
+ const [shareActionData, setShareActionData] = useState(
62
+ {} as ISubmitShareActionAttributes
63
+ )
64
+ const [error, setError] = useState({} as AxiosError)
65
+ useCookieListener(X_TF_ECOMMERCE, value => setIsLoggedIn(Boolean(value)))
66
+ useEffect(() => {
67
+ const fetchConfirmationData = async () => {
68
+ try {
69
+ if (hash && isLoggedIn) {
70
+ const shareOptionsData = await getPreRegistrationShareOptions({
71
+ hash,
72
+ })
73
+ const { attributes } = shareOptionsData.data
74
+ setShareOptions(shareOptionsData.data)
75
+ setShareActionData({
76
+ shareActionToken: attributes.shareActionToken,
77
+ tokenShuffleMethod: attributes.tokenShuffleMethod,
73
78
  })
74
- setPrizes(influencersData.data.attributes.prizes)
79
+ const eventId = _get(shareOptionsData, 'data.attributes.eventId')
80
+ if (eventId || pEventId) {
81
+ const influencersData = await getPreRegistrationInfluencers({
82
+ eventId: eventId || pEventId,
83
+ })
84
+ setPrizes(influencersData.data.attributes.prizes)
85
+ }
86
+ onGetConfirmationDataSuccess()
87
+ }
88
+ } catch (error) {
89
+ if (axios.isAxiosError(error)) {
90
+ setError(error.response?.data as AxiosError)
75
91
  }
76
- onGetConfirmationDataSuccess()
77
- }
78
- } catch (error) {
79
- if (axios.isAxiosError(error)) {
80
- setError(error.response?.data)
81
92
  }
82
93
  }
83
- }
84
- fetchConfirmationData()
85
- }, [
86
- pEventId,
87
- hash,
88
- onGetConfirmationDataError,
89
- onGetConfirmationDataSuccess,
90
- isLoggedIn,
91
- ])
94
+ fetchConfirmationData()
95
+ }, [
96
+ pEventId,
97
+ hash,
98
+ onGetConfirmationDataError,
99
+ onGetConfirmationDataSuccess,
100
+ isLoggedIn,
101
+ ])
92
102
 
93
- const onClose = () => {
94
- setShowCopyModal(false)
95
- }
103
+ const onClose = () => {
104
+ setShowCopyModal(false)
105
+ }
96
106
 
97
- const updateShareActionData = async () => {
98
- if (hash) {
99
- const shareOptionsData = await getPreRegistrationShareOptions({
100
- hash,
101
- })
102
- setShareOptions(shareOptionsData.data)
103
- setShareActionData({
104
- shareActionToken: shareOptionsData.data.attributes.shareActionToken,
105
- tokenShuffleMethod: shareOptionsData.data.attributes.tokenShuffleMethod,
106
- })
107
+ const updateShareActionData = async () => {
108
+ if (hash) {
109
+ const shareOptionsData = await getPreRegistrationShareOptions({
110
+ hash,
111
+ })
112
+ setShareOptions(shareOptionsData.data)
113
+ setShareActionData({
114
+ shareActionToken: shareOptionsData.data.attributes.shareActionToken,
115
+ tokenShuffleMethod: shareOptionsData.data.attributes.tokenShuffleMethod,
116
+ })
117
+ }
107
118
  }
108
- }
109
- return (
110
- <>
111
- {isLoggedIn && _isEmpaty(error) ? (
112
- <div className={`${classNamePrefix}_pre_registration_complete_container`}>
113
- <CopyMessageModal showCopyModal={showCopyModal} onClose={onClose} />
114
- <p className={`${classNamePrefix}_pre_registration_complete_header`}>
115
- {pageHeader}
116
- </p>
117
- <div className={`${classNamePrefix}_pre_registration_complete_message`}>
118
- {pageMessage}
119
- </div>
120
- <div className={`${classNamePrefix}_pre_registration_complete_body`}>
121
- {!_isEmpaty(prizes) && (
122
- <Prewards classNamePrefix={classNamePrefix} data={prizes} />
123
- )}
119
+ return (
120
+ <ThemeProvider theme={themeMui}>
121
+ {isLoggedIn && _isEmpaty(error) ? (
122
+ <div className={`${classNamePrefix}_pre_registration_complete_container`}>
123
+ <CopyMessageModal showCopyModal={showCopyModal} onClose={onClose} />
124
+ <p className={`${classNamePrefix}_pre_registration_complete_header`}>
125
+ {pageHeader}
126
+ </p>
127
+ <div className={`${classNamePrefix}_pre_registration_complete_message`}>
128
+ {pageMessage}
129
+ </div>
130
+ <div className={`${classNamePrefix}_pre_registration_complete_body`}>
131
+ {!_isEmpaty(prizes) && (
132
+ <Prewards classNamePrefix={classNamePrefix} data={prizes} />
133
+ )}
124
134
 
125
- {!_isEmpaty(shareOptions) && (
126
- <ShareOptions
127
- classNamePrefix={classNamePrefix}
128
- data={shareOptions}
129
- onLinkCopied={() => {
130
- setShowCopyModal(true)
131
- onLinkCopied()
132
- }}
133
- shareActionData={shareActionData}
134
- updateShareActionData={updateShareActionData}
135
- hasCopyIcon={hasCopyIcon}
136
- hash={hash}
137
- />
138
- )}
135
+ {!_isEmpaty(shareOptions) && (
136
+ <ShareOptions
137
+ classNamePrefix={classNamePrefix}
138
+ data={shareOptions}
139
+ onLinkCopied={() => {
140
+ setShowCopyModal(true)
141
+ onLinkCopied()
142
+ }}
143
+ shareActionData={shareActionData}
144
+ updateShareActionData={updateShareActionData}
145
+ hasCopyIcon={hasCopyIcon}
146
+ hash={hash}
147
+ />
148
+ )}
149
+ </div>
139
150
  </div>
140
- </div>
141
- ) : (
142
- showModalLogin && (
143
- <LoginModal
144
- logo={logo}
145
- onClose={() => {
146
- setShowModalLogin(false)
147
- }}
148
- onLogin={res => {
149
- setShowModalLogin(false)
150
- onLoginSuccess(res)
151
- }}
151
+ ) : (
152
+ showModalLogin && (
153
+ <LoginModal
154
+ logo={logo}
155
+ onClose={() => {
156
+ setShowModalLogin(false)
157
+ }}
158
+ onLogin={res => {
159
+ setShowModalLogin(false)
160
+ onLoginSuccess(res)
161
+ }}
162
+ />
163
+ )
164
+ )}
165
+ {!_isEmpaty(error) && (
166
+ <ConfirmModal
167
+ hideCancelBtn
168
+ message={error.message}
169
+ onConfirm={() => onGetConfirmationDataError(error)}
152
170
  />
153
- )
154
- )}
155
- {!_isEmpaty(error) && (
156
- <ConfirmModal
157
- hideCancelBtn
158
- message={error.message}
159
- onConfirm={() => onGetConfirmationDataError(error)}
160
- />
161
- )}
162
- </>
163
- )
164
- }
171
+ )}
172
+ </ThemeProvider>
173
+ )
174
+ }
@@ -1,8 +1,9 @@
1
+ import { createTheme, ThemeProvider } from '@mui/material/styles'
1
2
  import _identity from 'lodash/identity'
2
3
  import _slice from 'lodash/slice'
3
4
  import React, { useEffect, useState } from 'react'
4
5
 
5
- import { getPreRegistrationInfluancers } from '../../api/preRegistrationComplete'
6
+ import { getPreRegistrationInfluencers } from '../../api/preRegistrationComplete'
6
7
  import { Influancers } from './Influancers'
7
8
  import { Prewards } from './Prewards'
8
9
 
@@ -14,15 +15,18 @@ export const PreRegistrationInformations = (props: IPreRegistrationInformationPr
14
15
  onGetPreregistrationDataError = _identity,
15
16
  influancersHeaderNode,
16
17
  prewardsHeaderNode,
18
+ themeOptions,
17
19
  } = props
18
20
 
21
+ const themeMui = createTheme(themeOptions)
22
+
19
23
  const [prizes, setPrizes] = useState([] as Array<IPrizeData>)
20
- const [influencers, setInfluencers] = useState([] as Array<IInfluancerData>)
24
+ const [influencers, setInfluencers] = useState([] as Array<IInfluencerData>)
21
25
  const topInfluancers = _slice(influencers, 0, 10)
22
26
  useEffect(() => {
23
27
  const fetchPreregistrationData = async () => {
24
28
  try {
25
- const preregistrationData = await getPreRegistrationInfluancers({
29
+ const preregistrationData = await getPreRegistrationInfluencers({
26
30
  eventId,
27
31
  })
28
32
  setPrizes(preregistrationData.data.attributes.prizes)
@@ -38,17 +42,19 @@ export const PreRegistrationInformations = (props: IPreRegistrationInformationPr
38
42
  }, [eventId, onGetPreregistrationDataError, onGetPreregistrationDataSuccess])
39
43
 
40
44
  return (
41
- <div className={`${classNamePrefix}_pre_registration_info_container`}>
42
- <Prewards
43
- headerNode={prewardsHeaderNode}
44
- data={prizes}
45
- classNamePrefix={classNamePrefix}
46
- />
47
- <Influancers
48
- headerNode={influancersHeaderNode}
49
- data={topInfluancers}
50
- classNamePrefix={classNamePrefix}
51
- />
52
- </div>
45
+ <ThemeProvider theme={themeMui}>
46
+ <div className={`${classNamePrefix}_pre_registration_info_container`}>
47
+ <Prewards
48
+ headerNode={prewardsHeaderNode}
49
+ data={prizes}
50
+ classNamePrefix={classNamePrefix}
51
+ />
52
+ <Influancers
53
+ headerNode={influancersHeaderNode}
54
+ data={topInfluancers}
55
+ classNamePrefix={classNamePrefix}
56
+ />
57
+ </div>
58
+ </ThemeProvider>
53
59
  )
54
60
  }
@@ -1,6 +1,8 @@
1
1
  import React from 'react'
2
2
 
3
- export const formFieldsNotLoggedIn: IFormFieldsSection[] = [
3
+ export const getFormFieldsNotLoggedIn = (
4
+ clientName?: string | number
5
+ ): IFormFieldsSection[] => [
4
6
  {
5
7
  name: 'basic-info',
6
8
  groupLabel: (
@@ -76,7 +78,7 @@ export const formFieldsNotLoggedIn: IFormFieldsSection[] = [
76
78
  groupLabel: (
77
79
  <div className="email-info-block">
78
80
  <span>Choose a password for your new</span>
79
- <b> Mana Common </b>
81
+ <b> {clientName || 'Mana Common'} </b>
80
82
  <span>account</span>
81
83
  </div>
82
84
  ),
@@ -103,7 +105,9 @@ export const formFieldsNotLoggedIn: IFormFieldsSection[] = [
103
105
  },
104
106
  ]
105
107
 
106
- export const formFieldsLoggedIn: IFormFieldsSection[] = [
108
+ export const getFormFieldsLoggedIn = (
109
+ clientName?: string | number
110
+ ): IFormFieldsSection[] => [
107
111
  {
108
112
  name: 'basic-info-logged-in',
109
113
  groupLabel:
@@ -153,7 +157,9 @@ export const formFieldsLoggedIn: IFormFieldsSection[] = [
153
157
  },
154
158
  {
155
159
  name: 'brandOptIn',
156
- label: 'I would like to be updated on Mana Common news, events and offers.',
160
+ label: `I would like to be updated on ${
161
+ clientName || 'Mana Common'
162
+ } news, events and offers.`,
157
163
  type: 'checkbox',
158
164
  },
159
165
  ],