PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.15.5
GiveWP – Donation Plugin and Fundraising Platform v4.15.5
4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 All 255 releases
give / src / EventTickets / resources / components / EventTicketsList.tsx

EventTicketsList.tsx in GiveWP – Donation Plugin and Fundraising Platform 4.15.5, at src/EventTickets/resources/components/EventTicketsList.tsx

39 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import {_x} from '@wordpress/i18n';
2 import EventTicketsListItem from './EventTicketsListItem';
3 import {EventTicketsListProps} from './types';
4
5 export default function EventTicketsList({
6 ticketTypes,
7 currency,
8 currencyRate,
9 selectedTickets = [],
10 handleSelect = null,
11 }: EventTicketsListProps) {
12 if (!ticketTypes?.length) {
13 return null;
14 }
15
16 return (
17 <div className={'givewp-event-tickets__tickets'}>
18 <h4>
19 {_x('Select tickets', 'Title above the list of ticket types in the Event Tickets template', 'give')}
20 </h4>
21 {ticketTypes.map((ticketType) => {
22 return (
23 <EventTicketsListItem
24 ticketType={ticketType}
25 selectedTickets={selectedTickets[ticketType.id]?.quantity ?? 0}
26 handleSelect={
27 handleSelect
28 ? handleSelect(ticketType.id, ticketType.ticketsAvailable, ticketType.price)
29 : () => null
30 }
31 currency={currency}
32 currencyRate={currencyRate}
33 />
34 );
35 })}
36 </div>
37 );
38 }
39