import { HydratedIsland } from '@/components/HydratedIsland';
import { ThreadList } from './ThreadList';
import type { Locale } from '@/lib/i18n';

interface Props {
  locale: Locale;
}

// Self-contained island: nests HydratedIsland + ThreadList inside one React
// component so ThreadList renders inside QueryClientProvider (not as Astro
// template children, which are SSR'd outside the island's React context).
export function ThreadListIsland({ locale }: Props) {
  return (
    <HydratedIsland locale={locale}>
      <ThreadList />
    </HydratedIsland>
  );
}
