import {ReactElement, useState} from "react"; import INewLibraryRecord, {Validate} from "../types/records/INewLibraryRecord"; import Loader from "../Loader"; import LocalLibrary from "../api/LocalLibrary"; import "../../styles/localLibrary.css"; import ILocalLibrary from "../types/ILocalLibrary"; export default function LocalLibraryItem({apiUri, library} : {apiUri: string, library: ILocalLibrary | null}) : ReactElement { const [loading, setLoading] = useState(false); const [record, setRecord] = useState({ path: library?.basePath ?? "", name: library?.libraryName ?? "" }); return (
setRecord({...record, name: e.currentTarget.value})}/> setRecord({...record, path: e.currentTarget.value})}/> {library ? : }
); }