Enhance KatalogArama component by adding PUAN_TURU_ETIKET for improved user feedback. Updated button aria-labels and display elements to include score type, ensuring better clarity and consistency in the UI. Adjusted styles for better responsiveness and visual alignment.
Some checks failed
Deploy / deploy (push) Has been cancelled
Some checks failed
Deploy / deploy (push) Has been cancelled
This commit is contained in:
@@ -13,6 +13,7 @@ import {
|
|||||||
sonucaGitIste,
|
sonucaGitIste,
|
||||||
useTercihProfili,
|
useTercihProfili,
|
||||||
} from "@/components/manuel-liste/profil-kapisi-store";
|
} from "@/components/manuel-liste/profil-kapisi-store";
|
||||||
|
import { PUAN_TURU_ETIKET } from "@/lib/sihirbaz";
|
||||||
import {
|
import {
|
||||||
ArrowRight,
|
ArrowRight,
|
||||||
BookOpenText,
|
BookOpenText,
|
||||||
@@ -218,12 +219,18 @@ export function KatalogArama({ rehberler }: { rehberler: RehberOzet[] }) {
|
|||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={profilDuzenlemeyiAc}
|
onClick={profilDuzenlemeyiAc}
|
||||||
aria-label={`Sıralamanı ve tercihlerini değiştir (${profil.sira.toLocaleString("tr-TR")})`}
|
aria-label={`Sıralamanı ve tercihlerini değiştir (${profil.sira.toLocaleString("tr-TR")} · ${PUAN_TURU_ETIKET[profil.tur] ?? profil.tur})`}
|
||||||
className="group/profil flex cursor-pointer items-center gap-2 rounded-full py-1.5 pl-4 pr-1.5 transition-colors duration-150 hover:bg-slate-100 focus-visible:bg-slate-100 focus-visible:outline-none"
|
className="group/profil flex cursor-pointer items-center gap-2 rounded-full py-1.5 pl-4 pr-1.5 transition-colors duration-150 hover:bg-slate-100 focus-visible:bg-slate-100 focus-visible:outline-none"
|
||||||
>
|
>
|
||||||
<Trophy className="size-4 shrink-0 text-orange-500" aria-hidden />
|
<Trophy className="size-4 shrink-0 text-orange-500" aria-hidden />
|
||||||
<span className="font-semibold tabular-nums tracking-tight text-slate-900">
|
<span className="font-semibold tracking-tight text-slate-900">
|
||||||
{profil.sira.toLocaleString("tr-TR")}
|
<span className="tabular-nums">
|
||||||
|
{profil.sira.toLocaleString("tr-TR")}
|
||||||
|
</span>
|
||||||
|
<span className="font-medium text-slate-500">
|
||||||
|
{" "}
|
||||||
|
· {PUAN_TURU_ETIKET[profil.tur] ?? profil.tur}
|
||||||
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
aria-hidden
|
aria-hidden
|
||||||
@@ -273,17 +280,23 @@ export function KatalogArama({ rehberler }: { rehberler: RehberOzet[] }) {
|
|||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={profilDuzenlemeyiAc}
|
onClick={profilDuzenlemeyiAc}
|
||||||
aria-label={`Sıralamanı ve tercihlerini değiştir (${profil.sira.toLocaleString("tr-TR")})`}
|
aria-label={`Sıralamanı ve tercihlerini değiştir (${profil.sira.toLocaleString("tr-TR")} · ${PUAN_TURU_ETIKET[profil.tur] ?? profil.tur})`}
|
||||||
className="flex h-9 max-w-40 cursor-pointer items-center gap-1.5 rounded-full border border-slate-200 bg-white py-1 pl-2.5 pr-1.5 text-xs font-semibold text-slate-900 transition-[background-color,transform] duration-150 hover:bg-slate-100 active:scale-[0.96] sm:h-12 sm:max-w-none sm:gap-2 sm:pl-3.5 sm:pr-2 sm:text-sm"
|
className="flex h-9 max-w-52 cursor-pointer items-center gap-1.5 rounded-full border border-slate-200 bg-white py-1 pl-2.5 pr-1.5 text-xs font-semibold text-slate-900 transition-[background-color,transform] duration-150 hover:bg-slate-100 active:scale-[0.96] sm:h-12 sm:max-w-none sm:gap-2 sm:pl-3.5 sm:pr-2 sm:text-sm"
|
||||||
>
|
>
|
||||||
<Trophy
|
<Trophy
|
||||||
className="size-3.5 shrink-0 text-orange-500 sm:size-4"
|
className="size-3.5 shrink-0 text-orange-500 sm:size-4"
|
||||||
aria-hidden
|
aria-hidden
|
||||||
/>
|
/>
|
||||||
<span className="truncate tabular-nums tracking-tight">
|
<span className="truncate tracking-tight">
|
||||||
{profil.sira.toLocaleString("tr-TR")}
|
<span className="tabular-nums">
|
||||||
|
{profil.sira.toLocaleString("tr-TR")}
|
||||||
|
</span>
|
||||||
|
<span className="font-medium text-slate-500">
|
||||||
|
{" "}
|
||||||
|
· {PUAN_TURU_ETIKET[profil.tur] ?? profil.tur}
|
||||||
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<span className="inline-flex items-center gap-0.5 rounded-full bg-slate-100 px-1.5 py-0.5 text-[10px] font-medium text-slate-500 sm:text-xs">
|
<span className="inline-flex shrink-0 items-center gap-0.5 rounded-full bg-slate-100 px-1.5 py-0.5 text-[10px] font-medium text-slate-500 sm:text-xs">
|
||||||
<SquarePen className="size-2.5 sm:size-3" aria-hidden />
|
<SquarePen className="size-2.5 sm:size-3" aria-hidden />
|
||||||
Değiştir
|
Değiştir
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user