Skip to content

Commit

Permalink
Merge pull request #56 from homebrewltd/fix/author-sort-manually
Browse files Browse the repository at this point in the history
fix: sort author manually from mdx
  • Loading branch information
freelerobot authored Aug 7, 2024
2 parents d1052a2 + 22c0aa8 commit 0ab7887
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/Blog/Authors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ const BlogAuthors = (props: Props) => {

if (!authors) return null;

const filteredAuthors = authorList.filter((author) =>
authors.includes(author.name)
);
const filteredAuthors = authorList
.filter((author) => authors.includes(author.name))
.sort((a, b) => authors.indexOf(a.name) - authors.indexOf(b.name));

return (
<div className="flex flex-row items-center mt-4 mb-8 w-full">
Expand Down

0 comments on commit 0ab7887

Please sign in to comment.