diff --git a/src/components/NamespaceSelector.tsx b/src/components/NamespaceSelector.tsx new file mode 100644 index 0000000..7303278 --- /dev/null +++ b/src/components/NamespaceSelector.tsx @@ -0,0 +1,21 @@ +import React, { useEffect, useState } from "react"; + +export default function NamespaceSelector({ value, onChange }) { + const [namespaces, setNamespaces] = useState([]); + + useEffect(() => { + fetch("/api/v1/namespaces") + .then((r) => r.json()) + .then((d) => setNamespaces(d.items || [])); + }, []); + + return ( + + ); +} \ No newline at end of file