mirror of
https://github.com/System-End/scraps.git
synced 2026-04-19 22:05:09 +00:00
Update +page.svelte
This commit is contained in:
parent
b0c25fe2c8
commit
c7d0411fe5
1 changed files with 7 additions and 2 deletions
|
|
@ -20,6 +20,11 @@
|
|||
import { API_URL } from '$lib/config';
|
||||
import { t } from '$lib/i18n';
|
||||
|
||||
const PHI = (1 + Math.sqrt(5)) / 2;
|
||||
const SCRAPS_PER_HOUR = PHI * 10;
|
||||
const DOLLARS_PER_HOUR = 4;
|
||||
const SCRAPS_PER_DOLLAR = SCRAPS_PER_HOUR / DOLLARS_PER_HOUR;
|
||||
|
||||
interface ShopStats {
|
||||
totalScrapsSpent: number;
|
||||
shopPurchases: number;
|
||||
|
|
@ -395,9 +400,9 @@
|
|||
<div>
|
||||
<p class="text-sm font-bold text-gray-500">cost per hour</p>
|
||||
<p class="text-4xl font-bold text-green-700">
|
||||
{stats.shopStats.costPerHour.toLocaleString()}
|
||||
${(stats.shopStats.costPerHour / SCRAPS_PER_DOLLAR).toFixed(2)}
|
||||
</p>
|
||||
<p class="text-xs text-gray-400">scraps spent ÷ shipped hours</p>
|
||||
<p class="text-xs text-gray-400">scraps spent ÷ shipped hours (in USD)</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue