import { CreditCardIcon } from "@heroicons/react/solid"; import { Elements } from "@stripe/react-stripe-js"; import dayjs from "dayjs"; import timezone from "dayjs/plugin/timezone"; import toArray from "dayjs/plugin/toArray"; import utc from "dayjs/plugin/utc"; import Head from "next/head"; import React, { FC, useEffect, useState } from "react"; import { FormattedNumber, IntlProvider } from "react-intl"; import PaymentComponent from "@ee/components/stripe/Payment"; import getStripe from "@ee/lib/stripe/client"; import { PaymentPageProps } from "@ee/pages/payment/[uid]"; import useTheme from "@lib/hooks/useTheme"; dayjs.extend(utc); dayjs.extend(toArray); dayjs.extend(timezone); const PaymentPage: FC = (props) => { const [is24h, setIs24h] = useState(false); const [date, setDate] = useState(dayjs.utc(props.booking.startTime)); const { isReady } = useTheme(props.profile.theme); useEffect(() => { setDate(date.tz(localStorage.getItem("timeOption.preferredTimeZone") || dayjs.tz.guess())); setIs24h(!!localStorage.getItem("timeOption.is24hClock")); }, []); const eventName = props.booking.title; return isReady ? (
Payment | {eventName} | Calendso
) : null; }; export default PaymentPage;