tf-checkout-react 1.3.18 → 1.3.20
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 +5 -0
- package/dist/components/ticketResale/index.d.ts +2 -1
- package/dist/components/ticketsContainer/index.d.ts +2 -1
- package/dist/tf-checkout-react.cjs.development.js +10 -4
- 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 +10 -4
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/billing-info-container/index.tsx +3 -0
- package/src/components/ticketResale/index.tsx +14 -9
- package/src/components/ticketsContainer/index.tsx +3 -1
package/package.json
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react'
|
|
2
|
-
import _get from 'lodash/get'
|
|
3
|
-
import { processTicket, declineInvitation } from '../../api'
|
|
4
1
|
import { AxiosError } from 'axios'
|
|
2
|
+
import _get from 'lodash/get'
|
|
3
|
+
import React, { useEffect, useState } from 'react'
|
|
4
|
+
|
|
5
|
+
import { declineInvitation,processTicket } from '../../api'
|
|
5
6
|
|
|
6
7
|
export interface ITicketResaleContainer {
|
|
7
|
-
onProcessTicketSuccess: (res: any) => void
|
|
8
|
-
onProcessTicketError: (e: AxiosError) => void
|
|
9
|
-
onDeclineTicketPurchaseSuccess: (res: any) => void
|
|
10
|
-
onDeclineTicketPurchaseError: (e: AxiosError) => void
|
|
11
|
-
orderHash?: string
|
|
8
|
+
onProcessTicketSuccess: (res: any) => void;
|
|
9
|
+
onProcessTicketError: (e: AxiosError) => void;
|
|
10
|
+
onDeclineTicketPurchaseSuccess: (res: any) => void;
|
|
11
|
+
onDeclineTicketPurchaseError: (e: AxiosError) => void;
|
|
12
|
+
orderHash?: string;
|
|
13
|
+
billingPath?: string;
|
|
12
14
|
}
|
|
13
15
|
|
|
14
16
|
export const TicketResaleContainer = ({
|
|
@@ -17,6 +19,7 @@ export const TicketResaleContainer = ({
|
|
|
17
19
|
onDeclineTicketPurchaseSuccess = () => {},
|
|
18
20
|
onDeclineTicketPurchaseError = () => {},
|
|
19
21
|
orderHash,
|
|
22
|
+
billingPath,
|
|
20
23
|
}: ITicketResaleContainer) => {
|
|
21
24
|
const isWindowDefined = typeof window !== 'undefined'
|
|
22
25
|
const [error, setError] = useState('')
|
|
@@ -52,7 +55,9 @@ export const TicketResaleContainer = ({
|
|
|
52
55
|
const event_id = _get(data, 'event_id')
|
|
53
56
|
|
|
54
57
|
onProcessTicketSuccess(response.data)
|
|
55
|
-
window.location.href =
|
|
58
|
+
window.location.href = `${
|
|
59
|
+
billingPath ?? '/billing/billing-info/'
|
|
60
|
+
}?age_required=${age_required}&names_required=${names_required}&event_id=${event_id}`
|
|
56
61
|
} catch (error) {
|
|
57
62
|
setError(error?.response?.data?.message)
|
|
58
63
|
onProcessTicketError(error.response)
|
|
@@ -87,6 +87,7 @@ export interface IGetTickets {
|
|
|
87
87
|
hideTicketsHeader?: boolean;
|
|
88
88
|
enableInfluencersSection?: boolean;
|
|
89
89
|
enableAddOns?: boolean;
|
|
90
|
+
ordersPath?: string;
|
|
90
91
|
}
|
|
91
92
|
|
|
92
93
|
export interface ITicket {
|
|
@@ -131,6 +132,7 @@ export const TicketsContainer = ({
|
|
|
131
132
|
enableAddOns = true,
|
|
132
133
|
handleNotInvitedModalClose = _identity,
|
|
133
134
|
handleInvalidLinkModalClose = _identity,
|
|
135
|
+
ordersPath,
|
|
134
136
|
}: IGetTickets) => {
|
|
135
137
|
const [selectedTickets, setSelectedTickets] = useState({} as ISelectedTickets)
|
|
136
138
|
const isWindowDefined = typeof window !== 'undefined'
|
|
@@ -255,7 +257,7 @@ export const TicketsContainer = ({
|
|
|
255
257
|
|
|
256
258
|
const handleOrdersClick = () => {
|
|
257
259
|
if (isWindowDefined) {
|
|
258
|
-
window.location.href = '/orders'
|
|
260
|
+
window.location.href = ordersPath ?? '/orders'
|
|
259
261
|
}
|
|
260
262
|
}
|
|
261
263
|
|