From 2728f249898ccb3f7aeb27323102c0d71d510425 Mon Sep 17 00:00:00 2001
From: Sebastien Castiel <sebastien@castiel.me>
Date: Thu, 18 Jan 2024 09:02:53 -0500
Subject: Remove unused code

---
 src/components/expense-form.tsx | 9 ---------
 1 file changed, 9 deletions(-)

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

diff --git a/src/components/expense-form.tsx b/src/components/expense-form.tsx
index dfaaaa0..46a004c 100644
--- a/src/components/expense-form.tsx
+++ b/src/components/expense-form.tsx
@@ -37,7 +37,6 @@ import { getCategories, getExpense, getGroup } from '@/lib/api'
 import { ExpenseFormValues, expenseFormSchema } from '@/lib/schemas'
 import { cn } from '@/lib/utils'
 import { zodResolver } from '@hookform/resolvers/zod'
-import { Category } from '@prisma/client'
 import { Save, Trash2 } from 'lucide-react'
 import { useSearchParams } from 'next/navigation'
 import { useForm } from 'react-hook-form'
@@ -114,14 +113,6 @@ export function ExpenseForm({
         },
   })
 
-  const categoriesByGroup = categories.reduce<Record<string, Category[]>>(
-    (acc, category) => ({
-      ...acc,
-      [category.grouping]: [...(acc[category.grouping] ?? []), category],
-    }),
-    {},
-  )
-
   return (
     <Form {...form}>
       <form onSubmit={form.handleSubmit((values) => onSubmit(values))}>
-- 
cgit v1.3

