'use client';

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

/**
 * 하위 호환성을 위한 리다이렉트 페이지
 * /issue-management/[id]/edit → /issue-management/[id]?mode=edit
 */
export default function IssueEditPage() {
  const params = useParams();
  const router = useRouter();
  const id = params.id as string;

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

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