feat: add translations for emails and type error fixes overall (#994)

* feat: add translations for forgot password email and misc

* fix: type fixes

* feat: translate invitation email

* fix: e2e tests

* fix: lint

* feat: type fixes and i18n for emails

* Merge main

* fix: jest import on server path

* Merge

* fix: playwright tests

* fix: lint

Co-authored-by: Bailey Pumfleet <[email protected]>
This commit is contained in:
Mihai CandBailey Pumfleet authored and GitHub committed 2021-10-25 14:05:21 +01:00
1 parent 356d470e16
commit 8d6fec79d3
35 files changed
+680 -461

No files matched your search

+3 -2
View File
@@ -12,13 +12,14 @@ import TableActions, { ActionType } from "@components/ui/TableActions";
type BookingItem = inferQueryOutput<"viewer.bookings">[number];
function BookingListItem(booking: BookingItem) {
const { t } = useLocale();
const { t, i18n } = useLocale();
const utils = trpc.useContext();
const mutation = useMutation(
async (confirm: boolean) => {
const res = await fetch("/api/book/confirm", {
method: "PATCH",
body: JSON.stringify({ id: booking.id, confirmed: confirm }),
body: JSON.stringify({ id: booking.id, confirmed: confirm, language: i18n.language }),
headers: {
"Content-Type": "application/json",
},
+2 -1
View File
@@ -36,7 +36,7 @@ import { TeamBookingPageProps } from "../../../pages/team/[slug]/book";
type BookingPageProps = BookPageProps | TeamBookingPageProps;
const BookingPage = (props: BookingPageProps) => {
const { t } = useLocale();
const { t, i18n } = useLocale();
const router = useRouter();
const { rescheduleUid } = router.query;
const { isReady } = useTheme(props.profile.theme);
@@ -109,6 +109,7 @@ const BookingPage = (props: BookingPageProps) => {
guests: guestEmails,
eventTypeId: props.eventType.id,
timeZone: timeZone(),
language: i18n.language,
};
if (typeof rescheduleUid === "string") payload.rescheduleUid = rescheduleUid;
if (typeof router.query.user === "string") payload.user = router.query.user;