mirror of
https://github.com/spliit-app/spliit.git
synced 2026-03-10 14:09:06 +01:00
Use modal dialogs for expense creation & edition (#10)
* First attemps at using route interception and modals * Remove route interception * Make it work * Use Vaul on small screens * Improve vaul
This commit is contained in:
committed by
GitHub
parent
66ab0ff82b
commit
1e66efe516
@@ -33,7 +33,9 @@ export function ExpenseList({
|
||||
expense.isReimbursement && 'italic',
|
||||
)}
|
||||
onClick={() => {
|
||||
router.push(`/groups/${groupId}/expenses/${expense.id}/edit`)
|
||||
router.push(`/groups/${groupId}/expenses/${expense.id}/edit`, {
|
||||
scroll: false,
|
||||
})
|
||||
}}
|
||||
>
|
||||
<div>
|
||||
@@ -66,7 +68,10 @@ export function ExpenseList({
|
||||
{currency} {(expense.amount / 100).toFixed(2)}
|
||||
</div>
|
||||
<Button size="icon" variant="link" className="-my-2" asChild>
|
||||
<Link href={`/groups/${groupId}/expenses/${expense.id}/edit`}>
|
||||
<Link
|
||||
href={`/groups/${groupId}/expenses/${expense.id}/edit`}
|
||||
scroll={false}
|
||||
>
|
||||
<ChevronRight className="w-4 h-4" />
|
||||
</Link>
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user