Fix import error in BudgetContext
The BudgetContext.tsx file was throwing an error because it was trying to import `BudgetPeriod` from the wrong location. Changed the import path to correctly reference the `BudgetPeriod` type.
This commit is contained in:
79
src/App.tsx
79
src/App.tsx
@@ -1,52 +1,47 @@
|
||||
|
||||
import React from 'react';
|
||||
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
|
||||
import React, { useEffect } from 'react';
|
||||
import { Routes, Route } from 'react-router-dom';
|
||||
import { BudgetProvider } from './contexts/budget/BudgetContext';
|
||||
import { Toaster } from './components/ui/toaster';
|
||||
import Index from './pages/Index';
|
||||
import Settings from './pages/Settings';
|
||||
import Login from './pages/Login';
|
||||
import Register from './pages/Register';
|
||||
import ForgotPassword from './pages/ForgotPassword';
|
||||
import NotFound from './pages/NotFound';
|
||||
import SecurityPrivacySettings from './pages/SecurityPrivacySettings';
|
||||
import ProfileManagement from './pages/ProfileManagement';
|
||||
import PaymentMethods from './pages/PaymentMethods';
|
||||
import NotificationSettings from './pages/NotificationSettings';
|
||||
import HelpSupport from './pages/HelpSupport';
|
||||
import Analytics from './pages/Analytics';
|
||||
import Settings from './pages/Settings';
|
||||
import Transactions from './pages/Transactions';
|
||||
import { AuthProvider } from './contexts/auth';
|
||||
import { BudgetProvider } from './contexts/BudgetContext';
|
||||
import { Toaster } from '@/components/ui/toaster';
|
||||
import { Toaster as SonnerToaster} from '@/components/ui/sonner';
|
||||
import SafeAreaContainer from './components/SafeAreaContainer';
|
||||
import Analytics from './pages/Analytics';
|
||||
import ProfileManagement from './pages/ProfileManagement';
|
||||
import NotFound from './pages/NotFound';
|
||||
import PaymentMethods from './pages/PaymentMethods';
|
||||
import HelpSupport from './pages/HelpSupport';
|
||||
import SecurityPrivacySettings from './pages/SecurityPrivacySettings';
|
||||
import NotificationSettings from './pages/NotificationSettings';
|
||||
import ForgotPassword from './pages/ForgotPassword';
|
||||
|
||||
function App() {
|
||||
useEffect(() => {
|
||||
document.title = "적자 탈출 가계부";
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<AuthProvider>
|
||||
<BudgetProvider>
|
||||
<Router>
|
||||
<SafeAreaContainer className="min-h-screen bg-neuro-background">
|
||||
<Routes>
|
||||
<Route path="/" element={<Index />} />
|
||||
<Route path="/login" element={<Login />} />
|
||||
<Route path="/register" element={<Register />} />
|
||||
<Route path="/forgot-password" element={<ForgotPassword />} />
|
||||
<Route path="/settings" element={<Settings />} />
|
||||
<Route path="/security-privacy" element={<SecurityPrivacySettings />} />
|
||||
<Route path="/profile" element={<ProfileManagement />} />
|
||||
<Route path="/payment-methods" element={<PaymentMethods />} />
|
||||
<Route path="/notifications" element={<NotificationSettings />} />
|
||||
<Route path="/help-support" element={<HelpSupport />} />
|
||||
<Route path="/analytics" element={<Analytics />} />
|
||||
<Route path="/transactions" element={<Transactions />} />
|
||||
<Route path="*" element={<NotFound />} />
|
||||
</Routes>
|
||||
</SafeAreaContainer>
|
||||
<Toaster />
|
||||
<SonnerToaster />
|
||||
</Router>
|
||||
</BudgetProvider>
|
||||
</AuthProvider>
|
||||
<BudgetProvider>
|
||||
<div className="App">
|
||||
<Routes>
|
||||
<Route path="/" element={<Index />} />
|
||||
<Route path="/login" element={<Login />} />
|
||||
<Route path="/register" element={<Register />} />
|
||||
<Route path="/settings" element={<Settings />} />
|
||||
<Route path="/transactions" element={<Transactions />} />
|
||||
<Route path="/analytics" element={<Analytics />} />
|
||||
<Route path="/profile" element={<ProfileManagement />} />
|
||||
<Route path="/payment-methods" element={<PaymentMethods />} />
|
||||
<Route path="/help-support" element={<HelpSupport />} />
|
||||
<Route path="/security-privacy" element={<SecurityPrivacySettings />} />
|
||||
<Route path="/notifications" element={<NotificationSettings />} />
|
||||
<Route path="/forgot-password" element={<ForgotPassword />} />
|
||||
<Route path="*" element={<NotFound />} />
|
||||
</Routes>
|
||||
<Toaster />
|
||||
</div>
|
||||
</BudgetProvider>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user