Redesign account pages, split payments and addresses to single pages, new dashboard

This commit is contained in:
2024-11-29 13:38:20 +01:00
parent c867d9d51f
commit 8a18b95031
32 changed files with 524 additions and 362 deletions

View File

@@ -20,4 +20,16 @@ export function dateToHumanReadableString(date: Date) {
*/
export function dateStringToHumanReadableString(string: string) {
return dateToHumanReadableString(new Date(string))
}
/**
* Format milliseconds to a readable format
*
* @param milliseconds Milliseconds to format
*
* @returns h:mm format
*/
export function millisecondsToHumanReadableString(milliseconds: number): string {
return Math.floor(milliseconds / 1000 / 60 / 60) + ':' +
String(Math.floor(milliseconds / 60000)).padStart(2, "0") + ''
}