1
0
Fork 0

fix(showcase list) - now they're sorted (#2282)

* fix(showcase list) - now they're sorted

* linter fixes
This commit is contained in:
James Gray 2024-07-22 17:48:23 -05:00 committed by GitHub
parent 698c1cd8cd
commit 580e14f39b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -106,28 +106,32 @@ function Home() {
</div>
</div>
<div className="mt-8 grid grid-cols-4 gap-0.5 md:grid-cols-6 lg:mt-0 lg:grid-cols-8">
{showcaseProjects.map(({ name, href, image }) => (
<div
key={href}
className="col-span-1 flex justify-center py-2 px-2 text-center"
>
<a
href={href}
rel="noreferrer"
target="_blank"
alt={`Discover DocSearch on the ${name} documentation`}
{showcaseProjects
.sort((a, b) => {
return a.name.localeCompare(b.name);
})
.map(({ name, href, image }) => (
<div
key={href}
className="col-span-1 flex justify-center py-2 px-2 text-center"
>
<img
className="inline-block h-10 w-10"
src={withBaseUrl(image)}
<a
href={href}
rel="noreferrer"
target="_blank"
alt={`Discover DocSearch on the ${name} documentation`}
/>
<div className="text-description uppercase text-xs py-2 font-semibold">
{name}
</div>
</a>
</div>
))}
>
<img
className="inline-block h-10 w-10"
src={withBaseUrl(image)}
alt={`Discover DocSearch on the ${name} documentation`}
/>
<div className="text-description uppercase text-xs py-2 font-semibold">
{name}
</div>
</a>
</div>
))}
</div>
</div>
</div>