Skip to content

Commit

Permalink
improve: change no-results copy (#62)
Browse files Browse the repository at this point in the history
Signed-off-by: james-a-morris <[email protected]>
  • Loading branch information
james-a-morris committed Sep 10, 2024
1 parent e98f5fb commit f75924e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/app/(routes)/blog/_components/posts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@ export async function Posts({
const searchedSlugs = await retrieveContentfulPublishedSlugs({
query: search,
});
return (
return searchedSlugs.length === 0 ? (
<h2 className="text-2xl my-auto flex-1 text-grey-400">No results.</h2>
) : (
<div className="flex w-full flex-col gap-4">
<Text variant="body" className="text-grey-400">
Search results
</Text>
{searchedSlugs.length === 0 ? (
<h2 className="text-text-secondary text-2xl my-auto flex-1">No results</h2>
) : (
searchedSlugs.map((slug) => <ArticleFullCard key={slug} slug={slug} />)
)}
{searchedSlugs.map((slug) => (
<ArticleFullCard key={slug} slug={slug} />
))}
</div>
);
}
Expand Down

0 comments on commit f75924e

Please sign in to comment.