diff --git a/client/src/pages/authors/Authors.tsx b/client/src/pages/authors/Authors.tsx index 1ed86b2..e68f8ed 100644 --- a/client/src/pages/authors/Authors.tsx +++ b/client/src/pages/authors/Authors.tsx @@ -567,13 +567,15 @@ export default function Authors() { {/* View controls bar */}
- - - All Authors - Alphabetical - Chronological - - +
+ + + All Authors + Alphabetical + Chronological + + +
@@ -714,134 +716,37 @@ export default function Authors() { )} {/* Author grid or list */} - - {isLoading ? ( -
- {Array.from({ length: PAGE_SIZE }).map((_, i) => ( - - -
-
-
-
-
-
+ {/* Note: Using the first Tabs component that already exists in the view controls */} + {isLoading ? ( +
+ {Array.from({ length: PAGE_SIZE }).map((_, i) => ( + + +
+
+
+
+
-
- - - ))} -
- ) : ( - <> - {viewMode === 'grid' ? ( -
- {sortedAuthors.map(author => renderAuthorCard(author))} -
- ) : ( -
- {sortedAuthors.map(author => renderAuthorListItem(author))} -
- )} - - )} - - - - {isLoading ? ( -
- {Array.from({ length: 3 }).map((_, i) => ( -
-
-
- {Array.from({ length: 4 }).map((_, j) => ( -
- ))}
-
- ))} -
- ) : ( - <> - {/* Alphabet navigation */} -
-
- {[..."ABCDEFGHIJKLMNOPQRSTUVWXYZ"].map(letter => { - const hasAuthors = sortedGroupKeys.includes(letter); - return ( - - {letter} - - ); - })} -
+
+ + + ))} +
+ ) : ( + <> + {viewMode === 'grid' ? ( +
+ {sortedAuthors.map(author => renderAuthorCard(author))}
- -
- {sortedGroupKeys.map(letter => ( -
-

- {letter} -

-
- {groupedAuthors![letter].map(author => ( - viewMode === 'grid' ? renderAuthorCard(author) : renderAuthorListItem(author) - ))} -
-
- ))} + ) : ( +
+ {sortedAuthors.map(author => renderAuthorListItem(author))}
- - )} - - - - {isLoading ? ( -
- {Array.from({ length: 4 }).map((_, i) => ( -
-
-
- {Array.from({ length: 3 }).map((_, j) => ( -
- ))} -
-
- ))} -
- ) : ( -
- {/* Group authors by century */} - {Array.from(new Set(authors?.map(a => Math.floor((a.birthYear || 1800) / 100) * 100))).sort().map(century => { - const centuryLabel = `${century}s`; - const centuryAuthors = authors?.filter(a => - Math.floor((a.birthYear || 1800) / 100) * 100 === century - ); - - return ( -
-

- {centuryLabel} -

-
- {centuryAuthors?.map(author => ( - viewMode === 'grid' ? renderAuthorCard(author) : renderAuthorListItem(author) - ))} -
-
- ); - })} -
- )} -
+ )} + + )} {/* Pagination */} {totalPages > 1 && (