import React, { useState } from 'react'; export default function KeyspaceManager({ keyspaces, onUnlock, onCreate, locked, onLock, currentKeyspace }) { const [selected, setSelected] = useState(keyspaces[0] || ''); const [password, setPassword] = useState(''); const [newKeyspace, setNewKeyspace] = useState(''); if (locked) { return (
setNewKeyspace(e.target.value)} /> setPassword(e.target.value)} />
); } return (
Keyspace: {currentKeyspace}
); }