'use client';

/**
 * 수리이력 목록/등록
 * URL: /quality/equipment-repairs
 * URL: /quality/equipment-repairs?mode=new (등록)
 */

import { useSearchParams } from 'next/navigation';
import { RepairList } from '@/components/quality/EquipmentRepair';
import { RepairForm } from '@/components/quality/EquipmentRepair/RepairForm';

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

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

  return <RepairList />;
}
