Fix: Ensure BudgetProvider usage
The `useBudget` hook was being called outside of the `BudgetProvider` context in the `Index` component. This commit ensures that the `Index` component and its children are wrapped with the `BudgetProvider` in `App.tsx` to resolve the error.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
import { useState, useRef, useEffect } from 'react';
|
||||
import { UseFormReturn, useForm } from 'react-hook-form';
|
||||
import { zodResolver } from '@hookform/resolvers/zod';
|
||||
import { Transaction } from '@/components/TransactionCard';
|
||||
import { Transaction } from '@/contexts/budget/types';
|
||||
import { useBudget } from '@/contexts/BudgetContext';
|
||||
import { toast } from '@/components/ui/use-toast';
|
||||
import { TransactionFormValues, transactionFormSchema, formatWithCommas } from './TransactionFormFields';
|
||||
|
||||
Reference in New Issue
Block a user