Skip to content

Commit

Permalink
feat: move tag position in search
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierniki committed Nov 9, 2023
1 parent 3c747df commit 2efb2be
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/components/Search/SearchDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,17 @@ function CustomHit({ hit, lang }: { hit: ArticleHit; lang: Locale }) {
className="mb-5 inline-flex w-full rounded-xl border-[1px] bg-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2"
>
<article className="flex cursor-pointer flex-col gap-5 rounded-md p-7">
{hit.tags.length > 0 && (
<div className="flex flex-wrap gap-2">
{hit.tags.map((tag) => {
return (
<Tag variant="light" key={tag}>
{tag}
</Tag>
)
})}
</div>
)}
<Highlight
attribute="title"
hit={hit}
Expand All @@ -90,15 +101,6 @@ function CustomHit({ hit, lang }: { hit: ArticleHit; lang: Locale }) {
root: "line-clamp-2 text-md",
}}
/>
<div className="flex flex-wrap gap-2">
{hit.tags?.map((tag) => {
return (
<Tag variant="light" key={tag}>
{tag}
</Tag>
)
})}
</div>
</article>
</a>
)
Expand Down

0 comments on commit 2efb2be

Please sign in to comment.