From 408e74a13e7772d85916c696dbb35dc79a02423a Mon Sep 17 00:00:00 2001 From: RodrigoEC Date: Wed, 14 Aug 2024 10:30:04 -0300 Subject: [PATCH] Fix glossary list post width bug --- components/Glossary/GlossaryItem.tsx | 6 +++--- sections/GlossaryPost.tsx | 4 +--- sections/GlossaryPostList.tsx | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/components/Glossary/GlossaryItem.tsx b/components/Glossary/GlossaryItem.tsx index 298b7737..e0b49e39 100644 --- a/components/Glossary/GlossaryItem.tsx +++ b/components/Glossary/GlossaryItem.tsx @@ -14,8 +14,8 @@ function GlossaryItem({ disabled?: boolean; }) { const styles = { - disabled: "opacity-60 pointer-events-none", - regular: "hover:text-[#02F67C] hover:bg-[#0D171790]", + disabled: "opacity-70 pointer-events-none", + regular: "text-[#C9CFCF] hover:text-[#02F67C] hover:bg-[#0D171790]", }; return ( {title} diff --git a/sections/GlossaryPost.tsx b/sections/GlossaryPost.tsx index e04edf15..8ae8c91e 100644 --- a/sections/GlossaryPost.tsx +++ b/sections/GlossaryPost.tsx @@ -115,8 +115,6 @@ export default function GlossaryPost({ slug, posts, CTA, disclaimer }: Props) { return titleA?.localeCompare(titleB); }); - console.log(posts); - const { title, image, content, excerpt } = post || DEFAULT_PROPS; function getFirstLetter(title: string) { @@ -169,7 +167,7 @@ export default function GlossaryPost({ slug, posts, CTA, disclaimer }: Props) {

{title}

-
+
{posts ?.filter( (post) => getFirstLetter(post?.title) === getFirstLetter(title) diff --git a/sections/GlossaryPostList.tsx b/sections/GlossaryPostList.tsx index 7924b15e..0e8164f6 100644 --- a/sections/GlossaryPostList.tsx +++ b/sections/GlossaryPostList.tsx @@ -45,7 +45,7 @@ export default function GlossaryPostList({ posts }: Props) { return (
-
+
{alphabet.map((letter) => { return (