Skip to content

Commit 36ac87b

Browse files
authored
Update error page (#4589)
1 parent 4c75cd2 commit 36ac87b

4 files changed

Lines changed: 32 additions & 20 deletions

File tree

frontend/public/images/ernesto.jpg

73.1 KB
Loading

frontend/public/videos/sad.mp4

-91.2 KB
Binary file not shown.

frontend/src/locale/index.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,6 +1162,11 @@ The sooner you buy your ticket, the more you save!`,
11621162
"The form will open on {date}. Please watch our socials for updates and any changes.",
11631163
"requestInvitationLetter.formClosed":
11641164
"The form is closed. If you have any questions, please contact us.",
1165+
1166+
"errorPage.title": "Something went wrong",
1167+
"errorPage.body":
1168+
"An unexpected error occurred. If this keeps happening, please {reportLink}! In the meantime, here's Ernesto thinking about pineapple pizza 🍕",
1169+
"errorPage.reportLink": "report the issue",
11651170
},
11661171
it: {
11671172
titleTemplate: "%s | PyCon Italia",
@@ -2350,6 +2355,11 @@ Clicca sulla casella per cambiare. Se lasciato vuoto, presumeremo che tu sia dis
23502355
"Di norma registriamo tutti i talk e li pubblichiamo successivamente sul nostro canale YouTube. Se non desideri che il tuo intervento venga registrato, seleziona questa opzione. Nota: il talk sarà comunque trasmesso in streaming.",
23512356
"cfp.doNotRecordCheckboxLabel":
23522357
"Confermo di non voler che il mio talk venga registrato. Comprendo che non verrà caricato sul canale YouTube di Python Italia e che non sarà possibile recuperarlo in futuro.",
2358+
2359+
"errorPage.title": "Qualcosa è andato storto",
2360+
"errorPage.body":
2361+
"Si è verificato un errore inaspettato. Se continua a succedere, {reportLink}! Nel frattempo, ecco Ernesto che pensa alla pizza con l'ananas 🍕",
2362+
"errorPage.reportLink": "segnala il problema",
23532363
},
23542364
};
23552365

frontend/src/pages/_error.tsx

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,37 @@
1-
import { Heading, Page, Section } from "@python-italia/pycon-styleguide";
1+
import { Heading, Page, Section, Text } from "@python-italia/pycon-styleguide";
22
import * as Sentry from "@sentry/nextjs";
33

44
import type { GetStaticProps } from "next";
55
import NextErrorComponent from "next/error";
6+
import { FormattedMessage } from "react-intl";
67

78
import { addApolloState, getApolloClient } from "~/apollo/client";
89
import { prefetchSharedQueries } from "~/helpers/prefetch";
910

1011
const ErrorPage = ({ statusCode }) => (
1112
<Page>
1213
<Section>
13-
<Heading size={4}>Ops {statusCode}</Heading>
14+
<Heading size={4}>
15+
<FormattedMessage id="errorPage.title" />
16+
</Heading>
17+
<Text size={2}>
18+
<FormattedMessage
19+
id="errorPage.body"
20+
values={{
21+
reportLink: (
22+
<a href="https://github.com/pythonitalia/pycon/issues">
23+
<FormattedMessage id="errorPage.reportLink" />
24+
</a>
25+
),
26+
}}
27+
/>
28+
</Text>
29+
<img
30+
src="/images/ernesto.jpg"
31+
alt="Ernesto thinking about pineapple pizza"
32+
style={{ maxWidth: "100%", marginTop: "1rem" }}
33+
/>
1434
</Section>
15-
16-
<video
17-
style={{
18-
position: "absolute",
19-
top: 0,
20-
left: 0,
21-
height: "100vh",
22-
width: "100vw",
23-
zIndex: -1,
24-
pointerEvents: "none",
25-
objectFit: "cover",
26-
opacity: 0.5,
27-
}}
28-
src="/videos/sad.mp4"
29-
autoPlay={true}
30-
muted={true}
31-
loop={true}
32-
/>
3335
</Page>
3436
);
3537

0 commit comments

Comments
 (0)