"use client"; import { useState } from "react"; import { buttonVariants } from "@/components/ui/button"; // Starts one check-sources job over the given projects. The route serialises it // with builds through the same job runner, so a running build makes this a 409 // that is shown, not swallowed. export default function CheckSourcesButton({ projects, label, }: { projects: string[]; label?: string; }) { const [state, setState] = useState<"idle" | "busy" | "started" | "failed">("idle"); const [msg, setMsg] = useState(null); if (!projects.length && !label) return null; return ( <> {msg && {msg}} ); }