Skip to content

Commit e030542

Browse files
authored
Add message about hotels in the tickets page (#4223)
1 parent fc7a98e commit e030542

File tree

4 files changed

+51
-14
lines changed

4 files changed

+51
-14
lines changed

frontend/src/components/products-list/index.tsx

Lines changed: 39 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
import { Heading, Section, Spacer } from "@python-italia/pycon-styleguide";
1+
import {
2+
Heading,
3+
Link,
4+
Section,
5+
Spacer,
6+
Text,
7+
} from "@python-italia/pycon-styleguide";
28
import { Fragment } from "react";
39
import { FormattedMessage } from "react-intl";
410

@@ -50,19 +56,39 @@ export const ProductsList = ({
5056

5157
return (
5258
<Section>
53-
{visibleCategories.includes(CheckoutCategory.Tickets) &&
54-
tickets.map((ticket) => (
55-
<Fragment key={ticket.id}>
56-
<TicketRow
57-
openByDefault={true}
58-
icon="tickets"
59-
iconBackground="pink"
60-
ticket={ticket}
61-
ignoreSoldOut={ignoreSoldOut}
59+
{visibleCategories.includes(CheckoutCategory.Tickets) && (
60+
<>
61+
<Text size={2}>
62+
<FormattedMessage
63+
id="tickets.description"
64+
values={{
65+
page: (
66+
<Text size="inherit" decoration="underline">
67+
<Link href="/hotels" target="_blank">
68+
<FormattedMessage id="tickets.description.page" />
69+
</Link>
70+
</Text>
71+
),
72+
}}
6273
/>
63-
<Spacer size="small" />
64-
</Fragment>
65-
))}
74+
</Text>
75+
76+
<Spacer size="small" />
77+
78+
{tickets.map((ticket) => (
79+
<Fragment key={ticket.id}>
80+
<TicketRow
81+
openByDefault={true}
82+
icon="tickets"
83+
iconBackground="pink"
84+
ticket={ticket}
85+
ignoreSoldOut={ignoreSoldOut}
86+
/>
87+
<Spacer size="small" />
88+
</Fragment>
89+
))}
90+
</>
91+
)}
6692

6793
{visibleCategories.includes(CheckoutCategory.Gadgets) && tshirt && (
6894
<>

frontend/src/components/tickets-page/tickets.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import type {
99
TicketsQueryResult,
1010
} from "~/types";
1111

12+
import { Text } from "@python-italia/pycon-styleguide";
13+
import { FormattedMessage } from "react-intl";
1214
import { ProductsList } from "../products-list";
1315
import { useLoginState } from "../profile/hooks";
1416
import { CheckoutBar } from "./checkout-bar";

frontend/src/locale/index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ export const messages = {
44
titleTemplate: "%s | PyCon Italia",
55
description:
66
"Join PyCon Italia May 28th to May 31st 2025 in Bologna, Italy!",
7+
8+
"tickets.description":
9+
"After you have purchased your tickets, you will be able to access the {page} with our discounted codes.",
10+
"tickets.description.page": "hotels page",
11+
712
"input.placeholder": "Type here...",
813
"global.accordion.close": "Close",
914
"global.accordion.readMore": "Read more",
@@ -2168,6 +2173,10 @@ Clicca sulla casella per cambiare. Se lasciato vuoto, presumeremo che tu sia dis
21682173
"cfp.availability.table.morning.range": "(11:00 - 13:00)",
21692174
"cfp.availability.table.afternoon": "Pomeriggio",
21702175
"cfp.availability.table.afternoon.range": "(15:00 - 18:00)",
2176+
2177+
"tickets.description":
2178+
"Dopo aver acquistato i tuoi biglietti, potrai accedere alla {page} con i nostri codici sconto.",
2179+
"tickets.description.page": "pagina hotels",
21712180
},
21722181
};
21732182

frontend/src/pages/tickets/personal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Heading, Section } from "@python-italia/pycon-styleguide";
1+
import { Heading, Section, Text } from "@python-italia/pycon-styleguide";
22
import React from "react";
33
import { FormattedMessage } from "react-intl";
44

0 commit comments

Comments
 (0)