'use client';

import { useRouter } from 'next/navigation';
import { MembersList } from './MembersList';
import type { TeamMember } from '@/lib/types';

interface TeamDetailClientProps {
  members: TeamMember[];
  teamId: string;
  isAdmin: boolean;
}

export function TeamDetailClient({ members, teamId, isAdmin }: TeamDetailClientProps) {
  const router = useRouter();

  const handleMemberUpdate = () => {
    router.refresh();
  };

  return <MembersList members={members} teamId={teamId} isAdmin={isAdmin} onMemberUpdate={handleMemberUpdate} />;
}

