mirror of
https://github.com/spliit-app/spliit.git
synced 2025-12-06 09:29:39 +01:00
Remove unused code
This commit is contained in:
@@ -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))}>
|
||||
|
||||
Reference in New Issue
Block a user