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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.3.18",
2
+ "version": "1.3.20",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -794,6 +794,9 @@ export const BillingInfoContainer = React.memo(
794
794
  return false
795
795
  }
796
796
  }
797
+ if (hideWalletAddressField && el.name === 'wallet-address-info') {
798
+ return false
799
+ }
797
800
  return true
798
801
  }),
799
802
  element =>
@@ -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 = `/billing/billing-info/?age_required=${age_required}&names_required=${names_required}&event_id=${event_id}`
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