mirror of
https://github.com/ManInDark/HabitTrove.git
synced 2026-01-21 06:34:30 +01:00
refactor: replace moment library with luxon
This commit is contained in:
@@ -13,6 +13,7 @@ import {
|
||||
DataType,
|
||||
DATA_DEFAULTS
|
||||
} from '@/lib/types'
|
||||
import { d2t, getNow, getNowInMilliseconds } from '@/lib/utils';
|
||||
|
||||
function getDefaultData<T>(type: DataType): T {
|
||||
return DATA_DEFAULTS[type]() as T;
|
||||
@@ -106,7 +107,7 @@ export async function addCoins(
|
||||
amount,
|
||||
type,
|
||||
description,
|
||||
timestamp: new Date().toISOString(),
|
||||
timestamp: d2t({ dateTime: getNow({}) }),
|
||||
...(relatedItemId && { relatedItemId })
|
||||
}
|
||||
|
||||
@@ -154,7 +155,7 @@ export async function removeCoins(
|
||||
amount: -amount,
|
||||
type,
|
||||
description,
|
||||
timestamp: new Date().toISOString(),
|
||||
timestamp: d2t({ dateTime: getNow({}) }),
|
||||
...(relatedItemId && { relatedItemId })
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user