polish(web): puan kuralları yalnız Uzmanlar sayfası altında, oyunlaştırılmış dille
Some checks failed
QA Gate (P0/P1) / Test affected app (pull_request) Has been cancelled
Some checks failed
QA Gate (P0/P1) / Test affected app (pull_request) Has been cancelled
Üstteki üç-kartlı kural bloğu ve oy kartındaki kural cümlesi kaldırıldı;
kurallar tek satır küçük puntoyla sayfanın en altında ("Oy ver +1 ·
çoğunluğu tuttur +2 bonus · kodu ilk değerlendiren 3 puanı kapar").
Başlık ve boş-durum metinleri de oyunlaştırıldı; oy kartında yalnız
"Her oy puan kazandırır · Parça Uzmanları sıralaması" linki kaldı.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -132,7 +132,7 @@ export function OemVoteCard({ oemCode }: { oemCode: string }) {
|
||||
</div>
|
||||
</div>
|
||||
<p className="mt-3 text-xs text-muted-foreground">
|
||||
Oy +1 puan, çoğunlukla aynı görüş +2 puan, ilk oy 3 puan ·{" "}
|
||||
Her oy puan kazandırır ·{" "}
|
||||
<Link to="/dashboard/uzmanlar" className="font-medium text-primary hover:underline">
|
||||
Parça Uzmanları sıralaması
|
||||
</Link>
|
||||
|
||||
@@ -9,7 +9,7 @@ import { capture } from "@/lib/posthog";
|
||||
import { Card, CardContent, Skeleton } from "@sase/ui";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { Link, createFileRoute } from "@tanstack/react-router";
|
||||
import { Medal, Sparkles, ThumbsUp, Trophy, Users } from "lucide-react";
|
||||
import { Medal, ThumbsUp, Trophy } from "lucide-react";
|
||||
import { useEffect } from "react";
|
||||
|
||||
interface LeaderboardEntry {
|
||||
@@ -31,28 +31,6 @@ export const Route = createFileRoute("/dashboard/uzmanlar")({
|
||||
|
||||
const SKELETON_KEYS = ["s0", "s1", "s2", "s3", "s4", "s5"] as const;
|
||||
|
||||
// Puanlama kuralları — API'deki computeVoteAward ile birebir aynı anlatım.
|
||||
const SCORING_RULES = [
|
||||
{
|
||||
key: "vote",
|
||||
icon: ThumbsUp,
|
||||
title: "+1 puan",
|
||||
text: "Katalogdaki bir OEM kodunu uyumlu/uyumsuz oylayın.",
|
||||
},
|
||||
{
|
||||
key: "majority",
|
||||
icon: Users,
|
||||
title: "+2 puan",
|
||||
text: "Oyunuz çoğunluk görüşüyle aynı yöndeyse ek puan kazanırsınız.",
|
||||
},
|
||||
{
|
||||
key: "first",
|
||||
icon: Sparkles,
|
||||
title: "3 puan",
|
||||
text: "Bir kodu ilk kez siz değerlendirirseniz tam puan sizindir.",
|
||||
},
|
||||
] as const;
|
||||
|
||||
function ExpertsPage() {
|
||||
const { data, isLoading } = useQuery({
|
||||
queryKey: ["oem-leaderboard"],
|
||||
@@ -91,28 +69,11 @@ function ExpertsPage() {
|
||||
Parça Uzmanları
|
||||
</h1>
|
||||
<p className="mt-1 text-sm text-muted-foreground">
|
||||
Katalogdaki OEM kodlarını uyumlu/uyumsuz oylayarak puan kazanın; doğru bilgi tüm parça
|
||||
OEM kodlarını oyla, puan topla, sıralamada yüksel — doğru bilgi bütün parça
|
||||
satıcılarının işini hızlandırır.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{/* Puanlama kuralları */}
|
||||
<Card>
|
||||
<CardContent className="grid gap-4 p-4 sm:grid-cols-3">
|
||||
{SCORING_RULES.map(({ key, icon: Icon, title, text }) => (
|
||||
<div key={key} className="flex items-start gap-3">
|
||||
<div className="flex size-8 shrink-0 items-center justify-center rounded-full bg-primary/10">
|
||||
<Icon className="size-4 text-primary" />
|
||||
</div>
|
||||
<div>
|
||||
<p className="text-sm font-semibold">{title}</p>
|
||||
<p className="text-xs text-muted-foreground">{text}</p>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
{isLoading ? (
|
||||
<div className="space-y-3">
|
||||
{SKELETON_KEYS.map((k) => (
|
||||
@@ -123,10 +84,10 @@ function ExpertsPage() {
|
||||
<Card>
|
||||
<CardContent className="flex flex-col items-center gap-3 py-12 text-center">
|
||||
<Trophy className="size-10 text-muted-foreground/50" />
|
||||
<p className="text-sm font-medium">Henüz oy kullanılmadı.</p>
|
||||
<p className="text-sm font-medium">Sıralama henüz boş.</p>
|
||||
<p className="max-w-md text-sm text-muted-foreground">
|
||||
İlk uzman siz olun: katalogda bir parçanın OEM kodunu değerlendirin, ilk oy 3 puan
|
||||
kazandırır.
|
||||
İlk uzman siz olun: katalogdan bir OEM kodunu değerlendirin, açılış puanlarını siz
|
||||
kapın.
|
||||
</p>
|
||||
<Link to="/dashboard/search" className="text-sm font-semibold text-primary underline">
|
||||
Şase sorgula ve oylamaya başla
|
||||
@@ -162,6 +123,13 @@ function ExpertsPage() {
|
||||
<LeaderboardRankings rankings={rankingItems} showPagination={entries.length > 25} />
|
||||
</>
|
||||
)}
|
||||
|
||||
{/* Puan kuralları yalnız burada yaşar — küçük punto (computeVoteAward ile aynı kural). */}
|
||||
<p className="pt-2 text-center text-[11px] leading-relaxed text-muted-foreground/70">
|
||||
Oy ver <span className="font-semibold text-muted-foreground">+1</span> · çoğunluğu tuttur{" "}
|
||||
<span className="font-semibold text-muted-foreground">+2 bonus</span> · kodu ilk
|
||||
değerlendiren <span className="font-semibold text-muted-foreground">3 puanı</span> kapar
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user