Files
gunshiz bec24ad00b
CI / Verify (push) Successful in 2m34s
CI / Build immutable images and deploy (push) Successful in 4m1s
feat : dd up up
2026-10-07 18:15:27 +07:00

18 lines
864 B
TypeScript

import { comparisonReferenceNames } from "@/lib/guides/comparison";
type WeaponRows = Parameters<typeof comparisonReferenceNames>[0];
export function ComparisonContext({ rows, metric }: {
rows?: WeaponRows;
metric?: "overallPercent" | "personalPercent";
}) {
const references = rows && metric ? comparisonReferenceNames(rows, metric) : [];
return <div className="flex flex-col gap-1 text-sm text-muted-foreground">
{rows && metric ? <p>
{metric === "overallPercent" ? "ดาเมจทั้งทีม" : "ดาเมจส่วนตัว"} - {references.length
? `รายการที่แสดง 100%: ${references.join(" / ")}`
: "ดูหมายเหตุของเงื่อนไขสำหรับรายการที่ใช้เป็นค่าฐาน"}
</p> : null}
</div>;
}