'use client';
import {VStack, HStack} from '@astryxdesign/core/Layout';
import {Text} from '@astryxdesign/core/Text';
import {Badge} from '@astryxdesign/core/Badge';
import {Timestamp} from '@astryxdesign/core/Timestamp';
import {Divider} from '@astryxdesign/core/Divider';
import {AsyncBoundary} from '@/shared/components/data/AsyncBoundary';
import {SkeletonRows} from '@/shared/components/patterns/LoadingState';
import {EmptyPanel} from '@/shared/components/patterns/EmptyPanel';
import {useCustomerHistory} from '@/features/customers/hooks/useCustomers';
/** Their visits, newest first — the one that enrolled them is marked. */
export function CustomerHistory({customerId}: {customerId: string}) {
const history = useCustomerHistory(customerId);
return (
}
empty={
}
>
{(visits) => (
{visits.map((v, i) => (
{i > 0 ? : null}
{v.siteName}
{v.isNewVisitor ? : null}
))}
)}
);
}