import { useMutation } from "@tanstack/react-query"; import { Trans, useTranslation } from "react-i18next"; import { I18nKey } from "#/i18n/declaration"; import AllHandsLogo from "#/assets/branding/all-hands-logo.svg?react"; import { ModalBackdrop } from "#/components/shared/modals/modal-backdrop"; import { ModalBody } from "#/components/shared/modals/modal-body"; import OpenHands from "#/api/open-hands"; import { BrandButton } from "../settings/brand-button"; import { displayErrorToast } from "#/utils/custom-toast-handlers"; export function SetupPaymentModal() { const { t } = useTranslation(); const { mutate, isPending } = useMutation({ mutationFn: OpenHands.createBillingSessionResponse, onSuccess: (data) => { window.location.href = data; }, onError: () => { displayErrorToast(t(I18nKey.BILLING$ERROR_WHILE_CREATING_SESSION)); }, }); return (

{t(I18nKey.BILLING$YOUVE_GOT_50)}

}} />

{t(I18nKey.BILLING$PROCEED_TO_STRIPE)}
); }