tf-checkout-react 1.0.99-beta.21 → 1.0.99-beta.22

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.0.99-beta.21",
2
+ "version": "1.0.99-beta.22",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -1,4 +1,4 @@
1
- import React from 'react'
1
+ import React, { ReactNode } from 'react'
2
2
  import './style.css'
3
3
 
4
4
  import _sortBy from 'lodash/sortBy'
@@ -9,6 +9,7 @@ interface ITicketsSectionProps {
9
9
  selectedTickets: any;
10
10
  handleTicketSelect: any;
11
11
  sortBySoldOut: boolean;
12
+ ticketsHeaderComponent?: ReactNode
12
13
  }
13
14
 
14
15
  export const TicketsSection = ({
@@ -16,12 +17,14 @@ export const TicketsSection = ({
16
17
  selectedTickets,
17
18
  handleTicketSelect,
18
19
  sortBySoldOut,
20
+ ticketsHeaderComponent
19
21
  }: ITicketsSectionProps) => {
20
22
  const sortedTicketsList = sortBySoldOut
21
23
  ? _sortBy(_sortBy(ticketsList, 'sortOrder'), 'soldOut')
22
24
  : _sortBy(ticketsList, 'sortOrder')
23
25
  return (
24
26
  <>
27
+ {ticketsHeaderComponent}
25
28
  {sortedTicketsList.map((ticket, i, arr) => {
26
29
  const isSoldOut =
27
30
  ticket.sold_out || !ticket.displayTicket || ticket.soldOut
@@ -1,4 +1,4 @@
1
- import React, { useState, useEffect, useRef } from 'react'
1
+ import React, { useState, useEffect, useRef, ReactNode } from 'react'
2
2
  import axios, { AxiosError } from 'axios'
3
3
  import { Loader } from '../common/index'
4
4
  import './style.css'
@@ -72,6 +72,7 @@ export interface IGetTickets {
72
72
  disableCountdownLeadingZero?: boolean;
73
73
  isLoggedIn?: boolean;
74
74
  actionsSectionComponent?: any;
75
+ ticketsHeaderComponent?: ReactNode
75
76
  }
76
77
 
77
78
  export interface ITicket {
@@ -106,7 +107,8 @@ export const TicketsContainer = ({
106
107
  sortBySoldOut = false,
107
108
  disableCountdownLeadingZero = false,
108
109
  isLoggedIn = false,
109
- actionsSectionComponent: ActionsSectionComponent
110
+ actionsSectionComponent : ActionsSectionComponent,
111
+ ticketsHeaderComponent
110
112
  }: IGetTickets) => {
111
113
  const [selectedTickets, setSelectedTickets] = useState({} as ISelectedTickets)
112
114
  const isWindowDefined = typeof window !== 'undefined'
@@ -410,6 +412,7 @@ export const TicketsContainer = ({
410
412
  selectedTickets={selectedTickets}
411
413
  handleTicketSelect={handleTicketSelect}
412
414
  sortBySoldOut={sortBySoldOut}
415
+ ticketsHeaderComponent={ticketsHeaderComponent}
413
416
  />
414
417
  )}
415
418
  {externalUrl ? null : isSalesClosed ? (