mirror of
https://github.com/spliit-app/spliit.git
synced 2026-03-10 05:59:06 +01:00
Create expense from receipt (#69)
* Create expense from receipt * Add modal * Update README
This commit is contained in:
committed by
GitHub
parent
9e300e0ff0
commit
4a9bf575bd
@@ -3,7 +3,7 @@ import { CategoryIcon } from '@/app/groups/[groupId]/expenses/category-icon'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { SearchBar } from '@/components/ui/search-bar'
|
||||
import { getGroupExpenses } from '@/lib/api'
|
||||
import { cn } from '@/lib/utils'
|
||||
import { cn, formatExpenseDate } from '@/lib/utils'
|
||||
import { Expense, Participant } from '@prisma/client'
|
||||
import dayjs, { type Dayjs } from 'dayjs'
|
||||
import { ChevronRight } from 'lucide-react'
|
||||
@@ -159,7 +159,7 @@ export function ExpenseList({
|
||||
{currency} {(expense.amount / 100).toFixed(2)}
|
||||
</div>
|
||||
<div className="text-xs text-muted-foreground">
|
||||
{formatDate(expense.expenseDate)}
|
||||
{formatExpenseDate(expense.expenseDate)}
|
||||
</div>
|
||||
</div>
|
||||
<Button
|
||||
@@ -189,10 +189,3 @@ export function ExpenseList({
|
||||
</p>
|
||||
)
|
||||
}
|
||||
|
||||
function formatDate(date: Date) {
|
||||
return date.toLocaleDateString('en-US', {
|
||||
dateStyle: 'medium',
|
||||
timeZone: 'UTC',
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user