Container component that manages newsletter signup flow with loading and feedback UI.
// Source: https://github.com/makerkit/nextjs-saas-starter-kit-lite | License: MIT | Copyright 2024 MakerKit
// Provided via justclaw.it.com; keep this notice with the code.
'use client';
import { useCallback, useState } from 'react';
import { cn } from '../../lib/utils';
import { Alert, AlertDescription, AlertTitle } from '../../shadcn/alert';
import { Heading } from '../../shadcn/heading';
import { alertExtras } from '../alert';
import { Spinner } from '../spinner';
import { NewsletterSignup } from './newsletter-signup';
interface NewsletterSignupContainerProps extends React.HTMLAttributes<HTMLDivElement> {
onSignup: (email: string) => Promise<void>;
heading?: string;
description?: string;
successMessage?: string;
errorMessage?: string;
}
export function NewsletterSignupCon
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key