tf-checkout-react 1.0.99 → 1.0.100-beta.2
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.
- package/README.md +278 -1
- package/dist/api/index.d.ts +31 -26
- package/dist/components/account-settings/index.d.ts +3 -0
- package/dist/components/billing-info-container/index.d.ts +5 -5
- package/dist/components/billing-info-container/utils.d.ts +1 -0
- package/dist/components/common/CustomField.d.ts +1 -1
- package/dist/components/common/DatePickerField.d.ts +14 -0
- package/dist/components/common/RedirectModal.d.ts +7 -0
- package/dist/components/common/SnackbarAlert.d.ts +13 -0
- package/dist/components/confirmationContainer/index.d.ts +2 -1
- package/dist/components/countdown/index.d.ts +4 -1
- package/dist/components/myTicketsContainer/tableConfig.d.ts +0 -1
- package/dist/components/orderDetailsContainer/index.d.ts +5 -1
- package/dist/components/orderDetailsContainer/ticketsTable.d.ts +4 -1
- package/dist/components/paymentContainer/index.d.ts +3 -1
- package/dist/components/rsvpContainer/index.d.ts +7 -0
- package/dist/components/stripePayment/index.d.ts +2 -1
- package/dist/components/ticketResale/index.d.ts +5 -3
- package/dist/components/ticketsContainer/AccessCodeSection.d.ts +7 -0
- package/dist/components/ticketsContainer/PromoCodeSection.d.ts +6 -9
- package/dist/components/ticketsContainer/TicketsSection.d.ts +5 -3
- package/dist/components/ticketsContainer/index.d.ts +13 -2
- package/dist/components/timerWidget/index.d.ts +3 -3
- package/dist/env.d.ts +1 -0
- package/dist/images/cross.svg +44 -0
- package/dist/images/done.svg +3 -3
- package/dist/index.d.ts +2 -0
- package/dist/tf-checkout-react.cjs.development.js +1400 -575
- package/dist/tf-checkout-react.cjs.development.js.map +1 -1
- package/dist/tf-checkout-react.cjs.production.min.js +1 -1
- package/dist/tf-checkout-react.cjs.production.min.js.map +1 -1
- package/dist/tf-checkout-react.esm.js +1409 -586
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/dist/tf-checkout-styles.css +1 -1
- package/dist/utils/cookies.d.ts +3 -0
- package/dist/utils/createCheckoutDataBodyWithDefaultHolder.d.ts +6 -1
- package/dist/utils/downloadPDF.d.ts +1 -1
- package/dist/utils/getDomain.d.ts +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/package.json +89 -89
- package/src/.DS_Store +0 -0
- package/src/.d.ts +2 -2
- package/src/api/index.ts +313 -278
- package/src/assets/images/cross.svg +44 -0
- package/src/assets/images/done.svg +3 -3
- package/src/components/.DS_Store +0 -0
- package/src/components/account-settings/index.tsx +161 -0
- package/src/components/account-settings/style.css +200 -0
- package/src/components/billing-info-container/index.tsx +821 -777
- package/src/components/billing-info-container/style.css +106 -106
- package/src/components/billing-info-container/utils.ts +233 -223
- package/src/components/common/CheckboxField.tsx +41 -41
- package/src/components/common/CustomField.tsx +87 -84
- package/src/components/common/DatePickerField.tsx +98 -0
- package/src/components/common/FormikPhoneNumberField.tsx +51 -51
- package/src/components/common/Loader.tsx +9 -9
- package/src/components/common/RadioField.tsx +35 -35
- package/src/components/common/RedirectModal.tsx +43 -0
- package/src/components/common/SelectField.tsx +80 -80
- package/src/components/common/SnackbarAlert.tsx +54 -0
- package/src/components/common/dist/PhoneNumberField.js +96 -0
- package/src/components/common/index.tsx +4 -4
- package/src/components/confirmModal/index.tsx +51 -51
- package/src/components/confirmModal/style.css +21 -21
- package/src/components/confirmationContainer/config.ts +72 -72
- package/src/components/confirmationContainer/index.tsx +197 -194
- package/src/components/confirmationContainer/social-buttons.tsx +94 -94
- package/src/components/confirmationContainer/style.css +202 -202
- package/src/components/countdown/index.tsx +100 -89
- package/src/components/countdown/style.css +9 -9
- package/src/components/index.ts +7 -7
- package/src/components/loginModal/index.tsx +171 -209
- package/src/components/loginModal/style.css +71 -71
- package/src/components/myTicketsContainer/index.tsx +201 -137
- package/src/components/myTicketsContainer/row.tsx +41 -41
- package/src/components/myTicketsContainer/style.css +40 -40
- package/src/components/myTicketsContainer/tableConfig.tsx +32 -34
- package/src/components/orderDetailsContainer/index.tsx +289 -249
- package/src/components/orderDetailsContainer/style.css +73 -73
- package/src/components/orderDetailsContainer/ticketsTable.tsx +177 -124
- package/src/components/paymentContainer/index.tsx +352 -284
- package/src/components/registerModal/index.tsx +183 -190
- package/src/components/rsvpContainer/index.tsx +126 -0
- package/src/components/stripePayment/index.tsx +258 -253
- package/src/components/stripePayment/style.css +60 -60
- package/src/components/ticketResale/index.tsx +74 -56
- package/src/components/ticketResaleModal/index.tsx +213 -210
- package/src/components/ticketResaleModal/style.css +28 -28
- package/src/components/ticketsContainer/AccessCodeSection.tsx +50 -0
- package/src/components/ticketsContainer/PromoCodeSection.tsx +89 -99
- package/src/components/ticketsContainer/ReferralLogic.tsx +31 -33
- package/src/components/ticketsContainer/TicketRow.tsx +89 -83
- package/src/components/ticketsContainer/TicketsSection.tsx +87 -81
- package/src/components/ticketsContainer/index.tsx +506 -409
- package/src/components/ticketsContainer/style.css +181 -181
- package/src/components/ticketsContainer/utils.ts +11 -11
- package/src/components/timerWidget/index.tsx +87 -70
- package/src/components/timerWidget/style.css +34 -26
- package/src/components/waitingList/index.tsx +178 -178
- package/src/components/waitingList/style.css +26 -26
- package/src/env.ts +20 -19
- package/src/index.ts +15 -13
- package/src/normalizers/index.ts +45 -45
- package/src/types/billing-info-data.ts +37 -37
- package/src/types/payment-field.ts +7 -7
- package/src/types/referral-promotion.ts +7 -7
- package/src/utils/cookies.ts +42 -0
- package/src/utils/createCheckoutDataBodyWithDefaultHolder.ts +71 -59
- package/src/utils/downloadPDF.tsx +52 -30
- package/src/utils/formikErrorFocus.ts +24 -24
- package/src/utils/getDomain.ts +15 -0
- package/src/utils/getImage.ts +14 -14
- package/src/utils/getQueryVariable.ts +13 -13
- package/src/utils/index.ts +7 -5
- package/src/utils/setConfigs.ts +26 -26
- package/src/utils/showZero.tsx +10 -10
- package/src/validators/index.ts +20 -20
|
@@ -1,137 +1,201 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react'
|
|
2
|
-
import './style.css'
|
|
3
|
-
|
|
4
|
-
import Table from '@mui/material/Table'
|
|
5
|
-
import TableBody from '@mui/material/TableBody'
|
|
6
|
-
import TableCell from '@mui/material/TableCell'
|
|
7
|
-
import TableContainer from '@mui/material/TableContainer'
|
|
8
|
-
import TableHead from '@mui/material/TableHead'
|
|
9
|
-
import TableRow from '@mui/material/TableRow'
|
|
10
|
-
import Paper from '@mui/material/Paper'
|
|
11
|
-
import TablePagination from '@mui/material/TablePagination'
|
|
12
|
-
import CircularProgress from '@mui/material/CircularProgress'
|
|
13
|
-
import TextField from '@mui/material/TextField'
|
|
14
|
-
import Autocomplete from '@mui/material/Autocomplete'
|
|
15
|
-
import _get from 'lodash/get'
|
|
16
|
-
import MyTicketsRow, { RowItems } from './row'
|
|
17
|
-
import tableConfig from './tableConfig'
|
|
18
|
-
import { getOrders } from '../../api'
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const [
|
|
42
|
-
const [
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
</
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
1
|
+
import React, { useEffect, useState } from 'react'
|
|
2
|
+
import './style.css'
|
|
3
|
+
|
|
4
|
+
import Table from '@mui/material/Table'
|
|
5
|
+
import TableBody from '@mui/material/TableBody'
|
|
6
|
+
// import TableCell from '@mui/material/TableCell'
|
|
7
|
+
import TableContainer from '@mui/material/TableContainer'
|
|
8
|
+
// import TableHead from '@mui/material/TableHead'
|
|
9
|
+
// import TableRow from '@mui/material/TableRow'
|
|
10
|
+
import Paper from '@mui/material/Paper'
|
|
11
|
+
import TablePagination from '@mui/material/TablePagination'
|
|
12
|
+
import CircularProgress from '@mui/material/CircularProgress'
|
|
13
|
+
import TextField from '@mui/material/TextField'
|
|
14
|
+
import Autocomplete from '@mui/material/Autocomplete'
|
|
15
|
+
import _get from 'lodash/get'
|
|
16
|
+
import MyTicketsRow, { RowItems } from './row'
|
|
17
|
+
// import tableConfig from './tableConfig'
|
|
18
|
+
import { getOrders } from '../../api'
|
|
19
|
+
import { LoginModal } from '../loginModal'
|
|
20
|
+
import axios from 'axios'
|
|
21
|
+
|
|
22
|
+
interface MyTicketsTypes {
|
|
23
|
+
handleDetailsInfo: (id: string) => void;
|
|
24
|
+
onGetOrdersSuccess: (res: any) => void;
|
|
25
|
+
onGetOrdersError: (err: any) => void;
|
|
26
|
+
|
|
27
|
+
theme?: 'light' | 'dark';
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
interface EventFilter {
|
|
31
|
+
event_name: string;
|
|
32
|
+
url_name: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export const MyTicketsContainer = ({
|
|
36
|
+
handleDetailsInfo = () => {},
|
|
37
|
+
onGetOrdersSuccess = () => {},
|
|
38
|
+
onGetOrdersError = () => {},
|
|
39
|
+
theme = 'dark',
|
|
40
|
+
}: MyTicketsTypes) => {
|
|
41
|
+
const [data, setData] = useState<any>(null)
|
|
42
|
+
const [loading, setLoading] = useState(true)
|
|
43
|
+
const [limit, setLimit] = useState(10)
|
|
44
|
+
const [filter, setFilter] = useState('')
|
|
45
|
+
|
|
46
|
+
const isWindowDefined = typeof window !== 'undefined'
|
|
47
|
+
const [isLogged, setIsLogged] = useState(
|
|
48
|
+
isWindowDefined ? !!window.localStorage.getItem('access_token') : false
|
|
49
|
+
)
|
|
50
|
+
const [showModalLogin, setShowModalLogin] = useState(false)
|
|
51
|
+
const [userExpired, setUserExpired] = useState(false)
|
|
52
|
+
|
|
53
|
+
//just once
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
fetchData(1, limit, filter)
|
|
56
|
+
}, [isLogged])
|
|
57
|
+
|
|
58
|
+
const fetchData = async (page: number, limit: number, filter: string) => {
|
|
59
|
+
try {
|
|
60
|
+
setLoading(true)
|
|
61
|
+
const response = await getOrders(page, limit, filter)
|
|
62
|
+
onGetOrdersSuccess(response)
|
|
63
|
+
|
|
64
|
+
const data = _get(response, 'data.data.attributes')
|
|
65
|
+
data.page -= 1
|
|
66
|
+
|
|
67
|
+
setData(data)
|
|
68
|
+
} catch (error) {
|
|
69
|
+
if (axios.isAxiosError(error)) {
|
|
70
|
+
if (error.response?.data.error === 'invalid_token') {
|
|
71
|
+
if (isWindowDefined) {
|
|
72
|
+
window.localStorage.removeItem('user_data')
|
|
73
|
+
window.localStorage.removeItem('access_token')
|
|
74
|
+
setUserExpired(true)
|
|
75
|
+
setShowModalLogin(true)
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
onGetOrdersError(error)
|
|
80
|
+
} finally {
|
|
81
|
+
setLoading(false)
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const handleChangePage = (_event: any, newPage: number) => {
|
|
86
|
+
fetchData(newPage + 1, limit, filter)
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const handleChangeRowsPerPage = (
|
|
90
|
+
event: React.ChangeEvent<HTMLInputElement>
|
|
91
|
+
) => {
|
|
92
|
+
fetchData(1, +event.target.value, filter)
|
|
93
|
+
setLimit(+event.target.value)
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
const onChange = (
|
|
97
|
+
_event: React.SyntheticEvent<Element, Event>,
|
|
98
|
+
eventFilter: EventFilter | null
|
|
99
|
+
) => {
|
|
100
|
+
fetchData(1, limit, eventFilter?.url_name || '')
|
|
101
|
+
setFilter(eventFilter?.url_name || '')
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return (
|
|
105
|
+
<div className={`my-ticket ${theme}`}>
|
|
106
|
+
{loading && (
|
|
107
|
+
<div className="loading">
|
|
108
|
+
<CircularProgress />
|
|
109
|
+
</div>
|
|
110
|
+
)}
|
|
111
|
+
{!isLogged ? (
|
|
112
|
+
<div className="account-actions-block">
|
|
113
|
+
<div className="login-block">
|
|
114
|
+
<button
|
|
115
|
+
className="login-register-button"
|
|
116
|
+
type="button"
|
|
117
|
+
onClick={() => {
|
|
118
|
+
setShowModalLogin(true)
|
|
119
|
+
}}
|
|
120
|
+
>
|
|
121
|
+
Login
|
|
122
|
+
</button>
|
|
123
|
+
<div className="logo-image-container">
|
|
124
|
+
<img
|
|
125
|
+
src={
|
|
126
|
+
theme === 'dark'
|
|
127
|
+
? 'https://www.ticketfairy.com/resources/images/logo-ttf.svg'
|
|
128
|
+
: 'https://www.ticketfairy.com/resources/images/logo-ttf-black.svg'
|
|
129
|
+
}
|
|
130
|
+
alt="nodata"
|
|
131
|
+
/>
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
) : null}
|
|
136
|
+
{data && (
|
|
137
|
+
<>
|
|
138
|
+
<h2>My Ticket Orders</h2>
|
|
139
|
+
<div className="order_event">
|
|
140
|
+
<Autocomplete
|
|
141
|
+
disablePortal
|
|
142
|
+
id="combo-box-demo"
|
|
143
|
+
getOptionLabel={(option: EventFilter) => option.event_name}
|
|
144
|
+
onChange={onChange}
|
|
145
|
+
options={data.purchased_events}
|
|
146
|
+
sx={{ width: 300 }}
|
|
147
|
+
renderInput={params => <TextField {...params} label="Events" />}
|
|
148
|
+
/>
|
|
149
|
+
<button className="clear">CLEAR</button>
|
|
150
|
+
</div>
|
|
151
|
+
|
|
152
|
+
<TableContainer component={Paper} className="my-ticket-table">
|
|
153
|
+
<Table aria-label="collapsible table">
|
|
154
|
+
{/*<TableHead>
|
|
155
|
+
<TableRow>
|
|
156
|
+
{tableConfig().header.map((column: string, index: number) => (
|
|
157
|
+
<TableCell key={index}>{column}</TableCell>
|
|
158
|
+
))}
|
|
159
|
+
<TableCell />
|
|
160
|
+
</TableRow>
|
|
161
|
+
</TableHead>*/}
|
|
162
|
+
<TableBody>
|
|
163
|
+
{data.orders?.map((row: RowItems) => (
|
|
164
|
+
<MyTicketsRow
|
|
165
|
+
key={row.id}
|
|
166
|
+
row={row}
|
|
167
|
+
handleDetailsInfo={handleDetailsInfo}
|
|
168
|
+
/>
|
|
169
|
+
))}
|
|
170
|
+
</TableBody>
|
|
171
|
+
</Table>
|
|
172
|
+
</TableContainer>
|
|
173
|
+
<TablePagination
|
|
174
|
+
rowsPerPageOptions={[10, 25, 100]}
|
|
175
|
+
component="div"
|
|
176
|
+
count={data.total_count}
|
|
177
|
+
rowsPerPage={limit}
|
|
178
|
+
page={data.page}
|
|
179
|
+
onPageChange={handleChangePage}
|
|
180
|
+
onRowsPerPageChange={handleChangeRowsPerPage}
|
|
181
|
+
/>
|
|
182
|
+
</>
|
|
183
|
+
)}
|
|
184
|
+
<>
|
|
185
|
+
{showModalLogin && (
|
|
186
|
+
<LoginModal
|
|
187
|
+
onClose={() => {
|
|
188
|
+
setShowModalLogin(false)
|
|
189
|
+
}}
|
|
190
|
+
onLogin={() => {
|
|
191
|
+
setShowModalLogin(false)
|
|
192
|
+
setUserExpired(false)
|
|
193
|
+
setIsLogged(true)
|
|
194
|
+
}}
|
|
195
|
+
userExpired={userExpired}
|
|
196
|
+
/>
|
|
197
|
+
)}
|
|
198
|
+
</>
|
|
199
|
+
</div>
|
|
200
|
+
)
|
|
201
|
+
}
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import TableRow from '@mui/material/TableRow'
|
|
3
|
-
import TableCell from '@mui/material/TableCell'
|
|
4
|
-
import tableConfig from './tableConfig'
|
|
5
|
-
|
|
6
|
-
export interface RowItems {
|
|
7
|
-
id: string;
|
|
8
|
-
date: string;
|
|
9
|
-
image: string;
|
|
10
|
-
eventName: string;
|
|
11
|
-
amount: string;
|
|
12
|
-
currency: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
interface RowPropsTypes {
|
|
16
|
-
row: RowItems;
|
|
17
|
-
handleDetailsInfo: (id: string) => void;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const Row = ({ row, handleDetailsInfo }: RowPropsTypes) => {
|
|
21
|
-
return (
|
|
22
|
-
<TableRow sx={{ '& > *': { borderBottom: 'unset' } }}>
|
|
23
|
-
{tableConfig().body.map((column: any, index: number) => (
|
|
24
|
-
<TableCell component="th" scope="row" key={index}>
|
|
25
|
-
{column(row)}
|
|
26
|
-
</TableCell>
|
|
27
|
-
))}
|
|
28
|
-
<TableCell component="th" scope="row">
|
|
29
|
-
<button
|
|
30
|
-
type='button'
|
|
31
|
-
className="order-details-button"
|
|
32
|
-
onClick={() => handleDetailsInfo(row.id)}
|
|
33
|
-
>
|
|
34
|
-
Details
|
|
35
|
-
</button>
|
|
36
|
-
</TableCell>
|
|
37
|
-
</TableRow>
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export default Row
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import TableRow from '@mui/material/TableRow'
|
|
3
|
+
import TableCell from '@mui/material/TableCell'
|
|
4
|
+
import tableConfig from './tableConfig'
|
|
5
|
+
|
|
6
|
+
export interface RowItems {
|
|
7
|
+
id: string;
|
|
8
|
+
date: string;
|
|
9
|
+
image: string;
|
|
10
|
+
eventName: string;
|
|
11
|
+
amount: string;
|
|
12
|
+
currency: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface RowPropsTypes {
|
|
16
|
+
row: RowItems;
|
|
17
|
+
handleDetailsInfo: (id: string) => void;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const Row = ({ row, handleDetailsInfo }: RowPropsTypes) => {
|
|
21
|
+
return (
|
|
22
|
+
<TableRow sx={{ '& > *': { borderBottom: 'unset' } }}>
|
|
23
|
+
{tableConfig().body.map((column: any, index: number) => (
|
|
24
|
+
<TableCell component="th" scope="row" key={index}>
|
|
25
|
+
{column(row)}
|
|
26
|
+
</TableCell>
|
|
27
|
+
))}
|
|
28
|
+
<TableCell component="th" scope="row">
|
|
29
|
+
<button
|
|
30
|
+
type='button'
|
|
31
|
+
className="order-details-button"
|
|
32
|
+
onClick={() => handleDetailsInfo(row.id)}
|
|
33
|
+
>
|
|
34
|
+
Details
|
|
35
|
+
</button>
|
|
36
|
+
</TableCell>
|
|
37
|
+
</TableRow>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export default Row
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
.my-ticket {
|
|
2
|
-
padding: 30px;
|
|
3
|
-
}
|
|
4
|
-
.my-ticket-table {
|
|
5
|
-
margin-top: 30px;
|
|
6
|
-
}
|
|
7
|
-
.my-ticket .loading {
|
|
8
|
-
width: 100%;
|
|
9
|
-
display: flex;
|
|
10
|
-
justify-content: center;
|
|
11
|
-
align-items: center;
|
|
12
|
-
height: 100vh;
|
|
13
|
-
position: fixed;
|
|
14
|
-
top: 0;
|
|
15
|
-
left: 0;
|
|
16
|
-
background-color: rgba(0, 0, 0, .4);
|
|
17
|
-
}
|
|
18
|
-
.my-ticket .event-info {
|
|
19
|
-
display: flex;
|
|
20
|
-
align-items: center;
|
|
21
|
-
}
|
|
22
|
-
.my-ticket thead th {
|
|
23
|
-
font-weight: 700;
|
|
24
|
-
}
|
|
25
|
-
.my-ticket .event-info img {
|
|
26
|
-
width: 50px;
|
|
27
|
-
margin-right: 10px;
|
|
28
|
-
}
|
|
29
|
-
.my-ticket .order-details-button {
|
|
30
|
-
border: none;
|
|
31
|
-
border-radius: 4px;
|
|
32
|
-
color: #fff;
|
|
33
|
-
background-color: #32325d;
|
|
34
|
-
transition: all 150ms ease;
|
|
35
|
-
cursor: pointer;
|
|
36
|
-
padding: 10px 14px;
|
|
37
|
-
}
|
|
38
|
-
.my-ticket .order-details-button:hover {
|
|
39
|
-
background-color: #505050;
|
|
40
|
-
}
|
|
1
|
+
.my-ticket {
|
|
2
|
+
padding: 30px;
|
|
3
|
+
}
|
|
4
|
+
.my-ticket-table {
|
|
5
|
+
margin-top: 30px;
|
|
6
|
+
}
|
|
7
|
+
.my-ticket .loading {
|
|
8
|
+
width: 100%;
|
|
9
|
+
display: flex;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
align-items: center;
|
|
12
|
+
height: 100vh;
|
|
13
|
+
position: fixed;
|
|
14
|
+
top: 0;
|
|
15
|
+
left: 0;
|
|
16
|
+
background-color: rgba(0, 0, 0, 0.4);
|
|
17
|
+
}
|
|
18
|
+
.my-ticket .event-info {
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
}
|
|
22
|
+
.my-ticket thead th {
|
|
23
|
+
font-weight: 700;
|
|
24
|
+
}
|
|
25
|
+
.my-ticket .event-info img {
|
|
26
|
+
width: 50px;
|
|
27
|
+
margin-right: 10px;
|
|
28
|
+
}
|
|
29
|
+
.my-ticket .order-details-button {
|
|
30
|
+
border: none;
|
|
31
|
+
border-radius: 4px;
|
|
32
|
+
color: #fff;
|
|
33
|
+
background-color: #32325d;
|
|
34
|
+
transition: all 150ms ease;
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
padding: 10px 14px;
|
|
37
|
+
}
|
|
38
|
+
.my-ticket .order-details-button:hover {
|
|
39
|
+
background-color: #505050;
|
|
40
|
+
}
|
|
@@ -1,34 +1,32 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
|
|
3
|
-
interface EventInfoTypes {
|
|
4
|
-
image: string;
|
|
5
|
-
name: string;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
const EventInfoItem = ({ image, name }: EventInfoTypes) => {
|
|
9
|
-
return (
|
|
10
|
-
<div className='event-info'>
|
|
11
|
-
<img src={image} alt="event" />
|
|
12
|
-
{name}
|
|
13
|
-
</div>
|
|
14
|
-
)
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const tableConfig = (key?: string) => {
|
|
18
|
-
let config;
|
|
19
|
-
switch (key) {
|
|
20
|
-
default:
|
|
21
|
-
config = {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
(row: any) => row.
|
|
25
|
-
(row: any) => row.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
export default tableConfig
|
|
1
|
+
import React from 'react'
|
|
2
|
+
|
|
3
|
+
interface EventInfoTypes {
|
|
4
|
+
image: string;
|
|
5
|
+
name: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const EventInfoItem = ({ image, name }: EventInfoTypes) => {
|
|
9
|
+
return (
|
|
10
|
+
<div className='event-info'>
|
|
11
|
+
<img src={image} alt="event" />
|
|
12
|
+
{name}
|
|
13
|
+
</div>
|
|
14
|
+
)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const tableConfig = (key?: string) => {
|
|
18
|
+
let config;
|
|
19
|
+
switch (key) {
|
|
20
|
+
default:
|
|
21
|
+
config = {
|
|
22
|
+
body: [
|
|
23
|
+
(row: any) => row.date,
|
|
24
|
+
(row: any) => <EventInfoItem image={row.image} name={row.eventName} />,
|
|
25
|
+
(row: any) => row.currency + row.amount
|
|
26
|
+
],
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return config
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export default tableConfig
|