import React, {ReactElement, useEffect} from "react"; import {getData} from "../../App"; export default interface IAuthor { authorId: string; authorName: string; } export function AuthorElement({apiUri, authorId} : {apiUri: string, authorId: string | null}) : ReactElement{ if(authorId === null) return (
Author
); let [name, setName] = React.useState{name}
); }