import React, { useState } from 'react'; import Row from 'react-bootstrap/Row'; import Col from 'react-bootstrap/Col'; import { Spinner, Table } from 'react-bootstrap'; import SearchField from './SearchField.js'; const search = (prefix, api, setState) => { setState({ data: undefined, loading: true }); const lookupSuccess = (response) => setState({ data: response.data, loading: false }); const lookupFail = (error) => { setState({ data: undefined, loading: false }); setState(() => { throw error; }); }; return api.lookupStorage(prefix).then(lookupSuccess).catch(lookupFail); }; const LookupStorageForm = ({ api }) => { const [state, setState] = useState({ data: undefined, loading: false }); return (
Key | Value |
---|