Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

681 B
Raw Blame
"use client";

import { Text } from "@/components/atoms/Text/Text";
import { ErrorCard } from "@/components/molecules/ErrorCard/ErrorCard";
import { useTrialCheckoutReturn } from "@/services/trials/useTrialCheckoutReturn";

export function TrialCheckoutConfirmation() {
  const confirmation = useTrialCheckoutReturn();
  if (confirmation.error)
    return (
      <ErrorCard
        context="your trial"
        responseError={{ message: confirmation.error }}
        onRetry={confirmation.retry}
      />
    );
  if (!confirmation.ready)
    return (
      <Text variant="body" role="status">
        Confirming your trial and card setup…
      </Text>
    );
  return null;
}