+ {authorsDocuments.map((d) => (
+
+ ))}
+ >
+ )}
)
diff --git a/src/app/author/[author]/findDocumentsByAuthor.ts b/src/app/author/[author]/findDocumentsByAuthor.ts
new file mode 100644
index 0000000..de7454b
--- /dev/null
+++ b/src/app/author/[author]/findDocumentsByAuthor.ts
@@ -0,0 +1,28 @@
+import { Document, documents } from '@/app/db/data'
+
+// Assuming the types Document, DocumentStatus, and reviewer are defined as provided in your question
+
+// Interface for the return output
+interface DocumentWithSlug {
+ slug: string
+ doc: Document
+}
+
+export default function findDocumentsByAuthor(
+ authorId: string
+): DocumentWithSlug[] {
+ // Initialize an empty array to store the results
+ const result: DocumentWithSlug[] = []
+
+ // Iterate over the documents object entries
+ for (const [slug, doc] of Object.entries(documents)) {
+ // Check if the authorId is present in the document's authors array
+ if (doc.manifest.authors.includes(authorId)) {
+ // If present, push the document along with its slug to the results array
+ result.push({ slug, doc })
+ }
+ }
+
+ // Return the results array
+ return result
+}
diff --git a/src/app/components/AuthorDocuments.tsx b/src/app/components/AuthorDocuments.tsx
new file mode 100644
index 0000000..96df11c
--- /dev/null
+++ b/src/app/components/AuthorDocuments.tsx
@@ -0,0 +1,8 @@
+/* this component is likely extremely inefficient so it should only be used in
+server side static components */
+
+export default function AuthorDocuments({
+ authorId,
+}: Readonly<{ authorId: string }>) {
+ return
{authorId}
+}
diff --git a/src/app/components/DocumentCard.tsx b/src/app/components/DocumentCard.tsx
new file mode 100644
index 0000000..f3fa0d0
--- /dev/null
+++ b/src/app/components/DocumentCard.tsx
@@ -0,0 +1,41 @@
+import { Document } from '@/app/db/data'
+import { Zilla_Slab } from 'next/font/google'
+import { Authors, Topics } from './DataDisplay'
+import { ItemBadge, Status } from './Badges'
+import { epoch2datestring } from '@/app/utils/epoch2datestring'
+import Link from 'next/link'
+
+const zillaSlab = Zilla_Slab({ subsets: ['latin'], weight: ['500'] })
+
+const DocumentCard = ({ doc, href }: { doc: Document; href: string }) => {
+ const { manifest, abstract } = doc
+ const { title, authors, topics, dates, status, type } = manifest
+ return (
+
+
+
{title}
+
+
+
+
+ Last updated on {epoch2datestring(dates[dates.length - 1])}
+