From 6a5efc5f3fa55b58489f88d82694e1a893439514 Mon Sep 17 00:00:00 2001
From: sashkent3 <33320473+sashkent3@users.noreply.github.com>
Date: Wed, 28 Feb 2024 19:58:49 +0400
Subject: Fix the default value for the expense shares field (#113)

* fix default shares value

* fix default shares value for reimbursements

* prettier
---
 src/components/expense-form.tsx | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

(limited to 'src/components/expense-form.tsx')

diff --git a/src/components/expense-form.tsx b/src/components/expense-form.tsx
index 84fe7c5..d8b63a8 100644
--- a/src/components/expense-form.tsx
+++ b/src/components/expense-form.tsx
@@ -114,7 +114,10 @@ export function ExpenseForm({
           paidBy: searchParams.get('from') ?? undefined,
           paidFor: [
             searchParams.get('to')
-              ? { participant: searchParams.get('to')!, shares: 1 }
+              ? {
+                  participant: searchParams.get('to')!,
+                  shares: '1' as unknown as number,
+                }
               : undefined,
           ],
           isReimbursement: true,
@@ -133,7 +136,7 @@ export function ExpenseForm({
           // paid for all, split evenly
           paidFor: group.participants.map(({ id }) => ({
             participant: id,
-            shares: 1,
+            shares: '1' as unknown as number,
           })),
           paidBy: getSelectedPayer(),
           isReimbursement: false,
-- 
cgit v1.3

