Files
OnePieceDle/src/lib/utils.ts
whidix 114f6cde7a feat: add daily win recording endpoint, user authentication, and profile management
- Implemented a POST endpoint for recording daily wins in the game.
- Created login and signup functionality with email and password.
- Developed a profile page allowing users to update their profile information, change passwords, and manage active sessions.
- Added a toggle feature for switching between login and signup forms.
- Enhanced the layout by removing the profile button and adjusting the header structure.
2026-03-02 22:00:24 +01:00

14 lines
379 B
TypeScript

export function formatBounty(bounty: number): string {
if (bounty >= 1_000_000_000) {
const billions = bounty / 1_000_000_000;
return `${billions}B`;
} else if (bounty >= 1_000_000) {
const millions = bounty / 1_000_000;
return `${millions}M`;
} else if (bounty >= 1_000) {
const thousands = bounty / 1_000;
return `${thousands}K`;
}
return bounty.toString();
}