'use client';

/**
 * 검사 목록/등록 페이지
 * URL: /quality/inspections
 * URL: /quality/inspections?mode=new
 */

import { useSearchParams } from 'next/navigation';
import { InspectionList, InspectionCreate } from '@/components/quality/InspectionManagement';

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

  if (mode === 'new') {
    return <InspectionCreate />;
  }

  return <InspectionList />;
}
