aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/app/components/Gaming/LeftTime.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/LeftTime.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/LeftTime.tsx')
-rw-r--r--frontend/app/components/Gaming/LeftTime.tsx38
1 files changed, 19 insertions, 19 deletions
diff --git a/frontend/app/components/Gaming/LeftTime.tsx b/frontend/app/components/Gaming/LeftTime.tsx
index 5013c76..a7678d6 100644
--- a/frontend/app/components/Gaming/LeftTime.tsx
+++ b/frontend/app/components/Gaming/LeftTime.tsx
@@ -1,26 +1,26 @@
type Props = {
- sec: number;
+ sec: number;
};
export default function LeftTime({ sec }: Props) {
- const s = sec % 60;
- const m = Math.floor(sec / 60) % 60;
- const h = Math.floor(sec / 3600) % 24;
- const d = Math.floor(sec / 86400);
+ const s = sec % 60;
+ const m = Math.floor(sec / 60) % 60;
+ const h = Math.floor(sec / 3600) % 24;
+ const d = Math.floor(sec / 86400);
- let leftTime = "";
- if (d > 0 || h > 0) {
- // 1d 2h 3m 4s
- leftTime = [
- d > 0 ? `${d}d` : "",
- h > 0 ? `${h}h` : "",
- m > 0 ? `${m}m` : "",
- `${s}s`,
- ].join(" ");
- } else {
- // 03:04
- leftTime = `${m.toString().padStart(2, "0")}:${s.toString().padStart(2, "0")}`;
- }
+ let leftTime = "";
+ if (d > 0 || h > 0) {
+ // 1d 2h 3m 4s
+ leftTime = [
+ d > 0 ? `${d}d` : "",
+ h > 0 ? `${h}h` : "",
+ m > 0 ? `${m}m` : "",
+ `${s}s`,
+ ].join(" ");
+ } else {
+ // 03:04
+ leftTime = `${m.toString().padStart(2, "0")}:${s.toString().padStart(2, "0")}`;
+ }
- return <div className="text-2xl md:text-3xl">{leftTime}</div>;
+ return <div className="text-2xl md:text-3xl">{leftTime}</div>;
}