aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/app/components/Gaming/ScoreBar.tsx
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-03-06 02:18:40 +0900
committernsfisis <nsfisis@gmail.com>2026-03-06 02:18:40 +0900
commit46f9ba5d8c295454381655e6ec02ad3cf8bd79db (patch)
treec54719cb129ee05f96c4898219588062f71daa36 /frontend/app/components/Gaming/ScoreBar.tsx
parent27f509ccf4fbfeaa1bc2580ae2251461dc44ebfa (diff)
downloadphperkaigi-2026-albatross-46f9ba5d8c295454381655e6ec02ad3cf8bd79db.tar.gz
phperkaigi-2026-albatross-46f9ba5d8c295454381655e6ec02ad3cf8bd79db.tar.zst
phperkaigi-2026-albatross-46f9ba5d8c295454381655e6ec02ad3cf8bd79db.zip
style: switch from tab to space indentation in frontend and worker/php
Update biome.json indentStyle from "tab" to "space" and reformat all files in both workspaces. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'frontend/app/components/Gaming/ScoreBar.tsx')
-rw-r--r--frontend/app/components/Gaming/ScoreBar.tsx48
1 files changed, 24 insertions, 24 deletions
diff --git a/frontend/app/components/Gaming/ScoreBar.tsx b/frontend/app/components/Gaming/ScoreBar.tsx
index 6a291cd..50a2402 100644
--- a/frontend/app/components/Gaming/ScoreBar.tsx
+++ b/frontend/app/components/Gaming/ScoreBar.tsx
@@ -1,30 +1,30 @@
type Props = {
- scoreA: number | null;
- scoreB: number | null;
- bgA: string;
- bgB: string;
+ scoreA: number | null;
+ scoreB: number | null;
+ bgA: string;
+ bgB: string;
};
export default function ScoreBar({ scoreA, scoreB, bgA, bgB }: Props) {
- let scoreRatio;
- if (scoreA === null && scoreB === null) {
- scoreRatio = 50;
- } else if (scoreA === null) {
- scoreRatio = 0;
- } else if (scoreB === null) {
- scoreRatio = 100;
- } else {
- const rawRatio = scoreB / (scoreA + scoreB);
- const k = 3.0;
- const emphasizedRatio =
- Math.pow(rawRatio, k) /
- (Math.pow(rawRatio, k) + Math.pow(1 - rawRatio, k));
- scoreRatio = emphasizedRatio * 100;
- }
+ let scoreRatio;
+ if (scoreA === null && scoreB === null) {
+ scoreRatio = 50;
+ } else if (scoreA === null) {
+ scoreRatio = 0;
+ } else if (scoreB === null) {
+ scoreRatio = 100;
+ } else {
+ const rawRatio = scoreB / (scoreA + scoreB);
+ const k = 3.0;
+ const emphasizedRatio =
+ Math.pow(rawRatio, k) /
+ (Math.pow(rawRatio, k) + Math.pow(1 - rawRatio, k));
+ scoreRatio = emphasizedRatio * 100;
+ }
- return (
- <div className={`w-full ${bgB}`}>
- <div className={`h-10 ${bgA}`} style={{ width: `${scoreRatio}%` }}></div>
- </div>
- );
+ return (
+ <div className={`w-full ${bgB}`}>
+ <div className={`h-10 ${bgA}`} style={{ width: `${scoreRatio}%` }}></div>
+ </div>
+ );
}