Limit author display

This commit is contained in:
Team 1280 Programming Laptop 2024-02-15 14:56:39 -08:00
parent 4b8bc355f9
commit 7d49198552

View file

@ -37,6 +37,7 @@ function sortAuthorsByDocumentsPublished(authors: {
export default function Home() { export default function Home() {
const AuthorDisplay = () => { const AuthorDisplay = () => {
let i = 0
return ( return (
<ol className='list-decimal pl-4 space-y-2'> <ol className='list-decimal pl-4 space-y-2'>
{sortAuthorsByDocumentsPublished(authors).map(({ id, author }) => { {sortAuthorsByDocumentsPublished(authors).map(({ id, author }) => {
@ -44,6 +45,9 @@ export default function Home() {
let affiliationSlug = data.affiliation[0].split('@')[1] let affiliationSlug = data.affiliation[0].split('@')[1]
let affiliation = affiliations[affiliationSlug] let affiliation = affiliations[affiliationSlug]
i++
if (i > 10) return
return ( return (
<li key={id}> <li key={id}>
<Link href={`/author/${id}`}> <Link href={`/author/${id}`}>