Skip to content

Commit bf5c0b4

Browse files
committed
Use normal component instead of "render" call
This turns out to be unrelated to the dropdown I'm using.
1 parent 3821ca2 commit bf5c0b4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/app/developer/components/Books.tsx

+4-3
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ const Books = () => {
5656
}
5757
}, [archiveLoader, osWebLoader]);
5858

59-
const renderBookLink = (id: string, book: Book | undefined) => {
59+
function BookLink({id, book}: {id: string, book: Book | undefined}) {
6060
const page = book && findDefaultBookPage(book);
61+
6162
return <>
6263
<div>
6364
<H3>{book && page
@@ -75,12 +76,12 @@ const Books = () => {
7576
: null
7677
}
7778
</>;
78-
};
79+
}
7980

8081
return <Panel title='Books'>
8182
<ul style={{paddingBottom: '5rem'}}>
8283
{books.map(([id, config, book]) => <BookLI key={id}>
83-
{renderBookLink(`${id}@${config.defaultVersion}`, book)}
84+
<BookLink id={`${id}@${config.defaultVersion}`} book={book} />
8485
</BookLI>)}
8586
</ul>
8687
</Panel>;

0 commit comments

Comments
 (0)