added support for tasks

This commit is contained in:
dohsimpson
2025-01-22 17:59:59 -05:00
parent 3b33719e1a
commit d3502e284d
19 changed files with 223 additions and 105 deletions

View File

@@ -28,7 +28,12 @@ export function useCoins() {
return null
}
const data = await addCoins(amount, description, 'MANUAL_ADJUSTMENT', undefined, note)
const data = await addCoins({
amount,
description,
type: 'MANUAL_ADJUSTMENT',
note
})
setCoins(data)
toast({ title: "Success", description: `Added ${amount} coins` })
return data
@@ -44,7 +49,12 @@ export function useCoins() {
return null
}
const data = await removeCoins(numAmount, description, 'MANUAL_ADJUSTMENT', undefined, note)
const data = await removeCoins({
amount: numAmount,
description,
type: 'MANUAL_ADJUSTMENT',
note
})
setCoins(data)
toast({ title: "Success", description: `Removed ${numAmount} coins` })
return data