'use client';

import { use, useEffect } from 'react';
import { useRouter } from 'next/navigation';

interface BiddingEditPageProps {
  params: Promise<{ id: string }>;
}

/**
 * 하위 호환성을 위한 리다이렉트 페이지
 * /bidding/[id]/edit → /bidding/[id]?mode=edit
 */
export default function BiddingEditPage({ params }: BiddingEditPageProps) {
  const { id } = use(params);
  const router = useRouter();

  useEffect(() => {
    router.replace(`/ko/construction/project/bidding/${id}?mode=edit`);
  }, [id, router]);

  return (
    <div className="flex items-center justify-center min-h-[400px]">
      <div className="text-muted-foreground">리다이렉트 중...</div>
    </div>
  );
}
