import { Navigate } from "react-router-dom";
import { getComplaintVerification } from "../utils/complaintVerificationStorage";
import { COMPLAINT_RECORDS_PATH } from "../utils/complaintRoutes";

export default function ComplaintFormPage() {
  const session = getComplaintVerification();

  if (!session) {
    return <Navigate to="/complaints" replace />;
  }

  return <Navigate to={COMPLAINT_RECORDS_PATH} replace />;
}
