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

export function ComplaintVerificationGuard() {
  const session = getComplaintVerification();

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

  return <Outlet />;
}
