fix: simplify desktop search panel
All checks were successful
Deploy to Frontend Servers / deploy (push) Successful in 25s
All checks were successful
Deploy to Frontend Servers / deploy (push) Successful in 25s
This commit is contained in:
@@ -361,41 +361,45 @@ export function SearchPanel({
|
||||
</section>
|
||||
) : null}
|
||||
|
||||
<section className={cleanQuery ? "mt-6" : showInput ? "mt-5" : "mt-0"}>
|
||||
<div className="mb-3 flex items-center justify-between">
|
||||
<h2 className="border-l-4 border-ark-gold pl-3 text-base font-bold text-neutral-100">
|
||||
{t("currentTags")}
|
||||
</h2>
|
||||
</div>
|
||||
{!cleanQuery ? (
|
||||
<section className={showInput ? "mt-5" : "mt-0"}>
|
||||
<div className="mb-3 flex items-center justify-between">
|
||||
<h2 className="border-l-4 border-ark-gold pl-3 text-base font-bold text-neutral-100">
|
||||
{t("currentTags")}
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
{isTagLoading ? (
|
||||
<div className="py-3 text-sm text-neutral-500">{t("loading")}</div>
|
||||
) : tags.length > 0 ? (
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{tags.map((tag) => {
|
||||
const active = selectedTag === tag.name;
|
||||
return (
|
||||
<button
|
||||
key={tag.name}
|
||||
type="button"
|
||||
onClick={() => showTagPosts(tag.name)}
|
||||
className={`rounded-full border px-3 py-1.5 text-xs font-bold transition ${
|
||||
active
|
||||
? "border-ark-gold bg-ark-gold/15 text-ark-gold"
|
||||
: "border-white/10 bg-[#232329] text-neutral-200 hover:border-ark-gold/60 hover:text-ark-gold"
|
||||
}`}
|
||||
>
|
||||
#{tag.name}
|
||||
</button>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
) : (
|
||||
<div className="py-3 text-sm text-neutral-500">
|
||||
{t("noTagsAvailable")}
|
||||
</div>
|
||||
)}
|
||||
</section>
|
||||
{isTagLoading ? (
|
||||
<div className="py-3 text-sm text-neutral-500">
|
||||
{t("loading")}
|
||||
</div>
|
||||
) : tags.length > 0 ? (
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{tags.map((tag) => {
|
||||
const active = selectedTag === tag.name;
|
||||
return (
|
||||
<button
|
||||
key={tag.name}
|
||||
type="button"
|
||||
onClick={() => showTagPosts(tag.name)}
|
||||
className={`rounded-full border px-3 py-1.5 text-xs font-bold transition ${
|
||||
active
|
||||
? "border-ark-gold bg-ark-gold/15 text-ark-gold"
|
||||
: "border-white/10 bg-[#232329] text-neutral-200 hover:border-ark-gold/60 hover:text-ark-gold"
|
||||
}`}
|
||||
>
|
||||
#{tag.name}
|
||||
</button>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
) : (
|
||||
<div className="py-3 text-sm text-neutral-500">
|
||||
{t("noTagsAvailable")}
|
||||
</div>
|
||||
)}
|
||||
</section>
|
||||
) : null}
|
||||
|
||||
{selectedTag ? (
|
||||
<section className="mt-6">
|
||||
|
||||
Reference in New Issue
Block a user