import {ReactElement, useState} from "react"; import INewLibraryRecord, {Validate} from "./records/INewLibraryRecord"; import Loader from "../Loader"; import LocalLibraryFunctions from "../LocalLibraryFunctions"; import "../../styles/localLibrary.css"; export default interface ILocalLibrary { localLibraryId: string; basePath: string; libraryName: string; } export 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 ? : }
); }