'use client';

import { useSearchParams } from 'next/navigation';
import { BoardManagement } from '@/components/board/BoardManagement';
import { BoardDetailClientV2 } from '@/components/board/BoardManagement/BoardDetailClientV2';

export default function BoardManagementPage() {
  const searchParams = useSearchParams();
  const mode = searchParams.get('mode');

  if (mode === 'new') {
    return <BoardDetailClientV2 boardId="new" />;
  }

  return <BoardManagement />;
}
