From b88eb4a9e3fafa8911d5d14de53e62ae04fca29a Mon Sep 17 00:00:00 2001 From: arrelin Date: Thu, 29 Jan 2026 15:32:22 +0300 Subject: [PATCH] try to do better --- frontend/src/components/ErrorBoundary.tsx | 7 ++++--- frontend/src/components/ShoppingListModal.tsx | 8 -------- .../src/components/family/AddCategorySection.tsx | 2 +- frontend/src/components/family/CategoryCard.tsx | 4 ++-- frontend/src/components/family/CategoryList.tsx | 2 +- frontend/src/components/family/FamilySummary.tsx | 2 +- frontend/src/components/family/InviteModal.tsx | 2 +- .../src/components/profile/FamilySection.tsx | 2 +- .../src/components/profile/MembersSection.tsx | 3 +-- .../src/components/profile/SettingsSection.tsx | 2 +- .../src/components/profile/ThemeSelector.tsx | 2 +- frontend/src/components/profile/UserInfo.tsx | 2 +- .../src/components/shopping/ShoppingItemCard.tsx | 4 +--- .../components/shopping/ShoppingItemInput.tsx | 3 ++- .../src/components/shopping/ShoppingItemList.tsx | 2 +- frontend/src/components/ui/Badge.tsx | 2 +- frontend/src/components/ui/Button.tsx | 2 +- frontend/src/components/ui/Card.tsx | 2 +- frontend/src/components/ui/Input.tsx | 3 ++- frontend/src/components/ui/Modal.tsx | 3 ++- frontend/src/constants/index.ts | 2 +- frontend/src/hooks/useCategories.ts | 5 +++-- frontend/src/hooks/useExpenses.ts | 2 +- frontend/src/hooks/useFamilyMembers.ts | 2 +- frontend/src/hooks/useInviteLink.ts | 2 +- frontend/src/hooks/useShoppingList.ts | 2 +- frontend/src/pages/Profile.tsx | 16 ++-------------- frontend/src/services/categoryService.ts | 2 +- frontend/src/services/expenseService.ts | 2 +- frontend/src/services/familyService.ts | 2 +- frontend/src/services/inviteService.ts | 2 +- frontend/src/services/shoppingService.ts | 2 +- frontend/src/store/useStore.ts | 2 +- frontend/src/utils/errorHandler.ts | 2 +- 34 files changed, 43 insertions(+), 61 deletions(-) diff --git a/frontend/src/components/ErrorBoundary.tsx b/frontend/src/components/ErrorBoundary.tsx index d2dbf28..2e9dd69 100644 --- a/frontend/src/components/ErrorBoundary.tsx +++ b/frontend/src/components/ErrorBoundary.tsx @@ -1,4 +1,5 @@ -import React, { Component, ReactNode } from 'react'; +import React, { Component } from 'react'; +import type { ReactNode } from 'react'; import { AlertTriangle } from 'lucide-react'; import { Button } from './ui'; @@ -22,7 +23,7 @@ export class ErrorBoundary extends Component { }; } - static getDerivedStateFromError(error: Error): Partial { + static getDerivedStateFromError(_error: Error): Partial { return { hasError: true }; } @@ -57,7 +58,7 @@ export class ErrorBoundary extends Component {

We're sorry, but something unexpected happened. Please try refreshing the page or going back to the home page.

- {process.env.NODE_ENV === 'development' && this.state.error && ( + {import.meta.env.DEV && this.state.error && (

{this.state.error.toString()} diff --git a/frontend/src/components/ShoppingListModal.tsx b/frontend/src/components/ShoppingListModal.tsx index 533baf0..78c32fe 100644 --- a/frontend/src/components/ShoppingListModal.tsx +++ b/frontend/src/components/ShoppingListModal.tsx @@ -1,4 +1,3 @@ -import { useState } from 'react'; import { useTranslation } from 'react-i18next'; import { ShoppingCart, CheckCheck, Trash2 } from 'lucide-react'; import { useShoppingList, useConfirm } from '../hooks'; @@ -16,7 +15,6 @@ export default function ShoppingListModal({ familyId, onClose }: ShoppingListMod const { t } = useTranslation(); const { items, loading, createItem, deleteItem, togglePurchased, markAllAsPurchased, clearAll } = useShoppingList(familyId); const { confirmState, confirm, cancel } = useConfirm(); - const [pendingAction, setPendingAction] = useState<{ type: 'delete' | 'markAll' | 'clearAll'; itemId?: number } | null>(null); const stats = shoppingService.getStats(items); @@ -25,24 +23,18 @@ export default function ShoppingListModal({ familyId, onClose }: ShoppingListMod }; const handleDelete = async (itemId: number) => { - setPendingAction({ type: 'delete', itemId }); await confirm(t('shopping.deleteConfirm'), t('shopping.deleteMessage')); await deleteItem(itemId); - setPendingAction(null); }; const handleMarkAll = async () => { - setPendingAction({ type: 'markAll' }); await confirm(t('shopping.markAllConfirm'), t('shopping.markAllMessage')); await markAllAsPurchased(); - setPendingAction(null); }; const handleClearAll = async () => { - setPendingAction({ type: 'clearAll' }); await confirm(t('shopping.clearAllConfirm'), t('shopping.clearAllMessage')); await clearAll(); - setPendingAction(null); }; const handleUpdate = async (itemId: number, name: string) => { diff --git a/frontend/src/components/family/AddCategorySection.tsx b/frontend/src/components/family/AddCategorySection.tsx index fc90a1e..950f244 100644 --- a/frontend/src/components/family/AddCategorySection.tsx +++ b/frontend/src/components/family/AddCategorySection.tsx @@ -2,7 +2,7 @@ import { useState } from 'react'; import { useTranslation } from 'react-i18next'; import { Plus, X } from 'lucide-react'; import { Button, Input } from '../ui'; -import { CreateCategoryRequest } from '../../types'; +import type { CreateCategoryRequest } from '../../types'; interface AddCategorySectionProps { showForm: boolean; diff --git a/frontend/src/components/family/CategoryCard.tsx b/frontend/src/components/family/CategoryCard.tsx index a6f66d8..51e1836 100644 --- a/frontend/src/components/family/CategoryCard.tsx +++ b/frontend/src/components/family/CategoryCard.tsx @@ -1,11 +1,11 @@ import { useState } from 'react'; import { useTranslation } from 'react-i18next'; import { Tag, TrendingDown, Plus, Trash2, RotateCcw, History, X, DollarSign, MessageSquare, Calendar } from 'lucide-react'; -import { CategoryWithRemaining } from '../../services'; +import type { CategoryWithRemaining } from '../../services'; import { categoryService, expenseService } from '../../services'; import { useExpenses } from '../../hooks'; import { format } from '../../utils/format'; -import { Button, Input, Badge } from '../ui'; +import { Button, Input } from '../ui'; interface CategoryCardProps { category: CategoryWithRemaining; diff --git a/frontend/src/components/family/CategoryList.tsx b/frontend/src/components/family/CategoryList.tsx index 255e1b8..007be48 100644 --- a/frontend/src/components/family/CategoryList.tsx +++ b/frontend/src/components/family/CategoryList.tsx @@ -1,4 +1,4 @@ -import { CategoryWithRemaining } from '../../services'; +import type { CategoryWithRemaining } from '../../services'; import { CategoryCard } from './CategoryCard'; interface CategoryListProps { diff --git a/frontend/src/components/family/FamilySummary.tsx b/frontend/src/components/family/FamilySummary.tsx index 2a77632..f5ac183 100644 --- a/frontend/src/components/family/FamilySummary.tsx +++ b/frontend/src/components/family/FamilySummary.tsx @@ -1,6 +1,6 @@ import { Wallet, ShoppingCart } from 'lucide-react'; import { useTranslation } from 'react-i18next'; -import { CategoryWithRemaining } from '../../services'; +import type { CategoryWithRemaining } from '../../services'; import { format } from '../../utils/format'; interface FamilySummaryProps { diff --git a/frontend/src/components/family/InviteModal.tsx b/frontend/src/components/family/InviteModal.tsx index ff49c3b..eba6419 100644 --- a/frontend/src/components/family/InviteModal.tsx +++ b/frontend/src/components/family/InviteModal.tsx @@ -3,7 +3,7 @@ import { useTranslation } from 'react-i18next'; import { Copy, Check, Loader2 } from 'lucide-react'; import { Modal, Button } from '../ui'; import { useInviteLink } from '../../hooks'; -import { InviteLinkResponse } from '../../types'; +import type { InviteLinkResponse } from '../../types'; interface InviteModalProps { onClose: () => void; diff --git a/frontend/src/components/profile/FamilySection.tsx b/frontend/src/components/profile/FamilySection.tsx index 97c2d63..0712809 100644 --- a/frontend/src/components/profile/FamilySection.tsx +++ b/frontend/src/components/profile/FamilySection.tsx @@ -1,7 +1,7 @@ import { useState } from 'react'; import { useTranslation } from 'react-i18next'; import { Users, Edit3, Save, X, AlertTriangle, Loader2 } from 'lucide-react'; -import { Family } from '../../types'; +import type { Family } from '../../types'; import { Card, Button, Input } from '../ui'; import { familyService } from '../../services'; import { showToast } from '../../utils/toast'; diff --git a/frontend/src/components/profile/MembersSection.tsx b/frontend/src/components/profile/MembersSection.tsx index 2bdf847..35c7e1a 100644 --- a/frontend/src/components/profile/MembersSection.tsx +++ b/frontend/src/components/profile/MembersSection.tsx @@ -1,6 +1,5 @@ import { useTranslation } from 'react-i18next'; -import { Loader2 } from 'lucide-react'; -import { FamilyMember, User } from '../../types'; +import type { FamilyMember, User } from '../../types'; import { Badge, LoadingSpinner } from '../ui'; interface MembersSectionProps { diff --git a/frontend/src/components/profile/SettingsSection.tsx b/frontend/src/components/profile/SettingsSection.tsx index f66a7d6..8294b68 100644 --- a/frontend/src/components/profile/SettingsSection.tsx +++ b/frontend/src/components/profile/SettingsSection.tsx @@ -1,6 +1,6 @@ import { Settings, Palette, Languages } from 'lucide-react'; import { useTranslation } from 'react-i18next'; -import { Theme } from '../../types'; +import type { Theme } from '../../types'; import { Card } from '../ui'; import { ThemeSelector } from './ThemeSelector'; import { LanguageSelector } from './LanguageSelector'; diff --git a/frontend/src/components/profile/ThemeSelector.tsx b/frontend/src/components/profile/ThemeSelector.tsx index 3c433cb..fdf5cf1 100644 --- a/frontend/src/components/profile/ThemeSelector.tsx +++ b/frontend/src/components/profile/ThemeSelector.tsx @@ -1,6 +1,6 @@ import { Check } from 'lucide-react'; import { useTranslation } from 'react-i18next'; -import { Theme } from '../../types'; +import type { Theme } from '../../types'; import { THEMES } from '../../constants'; interface ThemeSelectorProps { diff --git a/frontend/src/components/profile/UserInfo.tsx b/frontend/src/components/profile/UserInfo.tsx index f843d72..17724a2 100644 --- a/frontend/src/components/profile/UserInfo.tsx +++ b/frontend/src/components/profile/UserInfo.tsx @@ -1,6 +1,6 @@ import { User as UserIcon, LogOut } from 'lucide-react'; import { useTranslation } from 'react-i18next'; -import { User } from '../../types'; +import type { User } from '../../types'; import { Button, Card } from '../ui'; interface UserInfoProps { diff --git a/frontend/src/components/shopping/ShoppingItemCard.tsx b/frontend/src/components/shopping/ShoppingItemCard.tsx index 228ef4f..1767135 100644 --- a/frontend/src/components/shopping/ShoppingItemCard.tsx +++ b/frontend/src/components/shopping/ShoppingItemCard.tsx @@ -1,7 +1,6 @@ import { useState } from 'react'; -import { useTranslation } from 'react-i18next'; import { Trash2, Check, Pencil, X } from 'lucide-react'; -import { ShoppingItem } from '../../types'; +import type { ShoppingItem } from '../../types'; import { Button, Input } from '../ui'; interface ShoppingItemCardProps { @@ -12,7 +11,6 @@ interface ShoppingItemCardProps { } export function ShoppingItemCard({ item, onToggle, onDelete, onUpdate }: ShoppingItemCardProps) { - const { t } = useTranslation(); const [isEditing, setIsEditing] = useState(false); const [editName, setEditName] = useState(item.name); diff --git a/frontend/src/components/shopping/ShoppingItemInput.tsx b/frontend/src/components/shopping/ShoppingItemInput.tsx index 012883c..ec2ea24 100644 --- a/frontend/src/components/shopping/ShoppingItemInput.tsx +++ b/frontend/src/components/shopping/ShoppingItemInput.tsx @@ -1,4 +1,5 @@ -import { useState, KeyboardEvent } from 'react'; +import { useState } from 'react'; +import type { KeyboardEvent } from 'react'; import { useTranslation } from 'react-i18next'; import { Plus } from 'lucide-react'; import { Button, Input } from '../ui'; diff --git a/frontend/src/components/shopping/ShoppingItemList.tsx b/frontend/src/components/shopping/ShoppingItemList.tsx index a55e922..3268398 100644 --- a/frontend/src/components/shopping/ShoppingItemList.tsx +++ b/frontend/src/components/shopping/ShoppingItemList.tsx @@ -1,5 +1,5 @@ import { useTranslation } from 'react-i18next'; -import { ShoppingItem } from '../../types'; +import type { ShoppingItem } from '../../types'; import { ShoppingItemCard } from './ShoppingItemCard'; import { shoppingService } from '../../services'; diff --git a/frontend/src/components/ui/Badge.tsx b/frontend/src/components/ui/Badge.tsx index 2484ce5..6b9e14d 100644 --- a/frontend/src/components/ui/Badge.tsx +++ b/frontend/src/components/ui/Badge.tsx @@ -1,4 +1,4 @@ -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; interface BadgeProps { children: ReactNode; diff --git a/frontend/src/components/ui/Button.tsx b/frontend/src/components/ui/Button.tsx index 0161b52..24e85fa 100644 --- a/frontend/src/components/ui/Button.tsx +++ b/frontend/src/components/ui/Button.tsx @@ -1,4 +1,4 @@ -import { ButtonHTMLAttributes, ReactNode } from 'react'; +import type { ButtonHTMLAttributes, ReactNode } from 'react'; interface ButtonProps extends ButtonHTMLAttributes { variant?: 'primary' | 'success' | 'danger' | 'secondary' | 'ghost'; diff --git a/frontend/src/components/ui/Card.tsx b/frontend/src/components/ui/Card.tsx index e64bb4c..2ddf30c 100644 --- a/frontend/src/components/ui/Card.tsx +++ b/frontend/src/components/ui/Card.tsx @@ -1,4 +1,4 @@ -import { ReactNode } from 'react'; +import type { ReactNode } from 'react'; interface CardProps { children: ReactNode; diff --git a/frontend/src/components/ui/Input.tsx b/frontend/src/components/ui/Input.tsx index 66a48db..09ea5f5 100644 --- a/frontend/src/components/ui/Input.tsx +++ b/frontend/src/components/ui/Input.tsx @@ -1,4 +1,5 @@ -import { InputHTMLAttributes, forwardRef } from 'react'; +import { forwardRef } from 'react'; +import type { InputHTMLAttributes } from 'react'; interface InputProps extends InputHTMLAttributes { label?: string; diff --git a/frontend/src/components/ui/Modal.tsx b/frontend/src/components/ui/Modal.tsx index 973c8c6..b367f9f 100644 --- a/frontend/src/components/ui/Modal.tsx +++ b/frontend/src/components/ui/Modal.tsx @@ -1,4 +1,5 @@ -import { ReactNode, useEffect } from 'react'; +import { useEffect } from 'react'; +import type { ReactNode } from 'react'; interface ModalProps { isOpen: boolean; diff --git a/frontend/src/constants/index.ts b/frontend/src/constants/index.ts index 30eee60..d823c7a 100644 --- a/frontend/src/constants/index.ts +++ b/frontend/src/constants/index.ts @@ -1,4 +1,4 @@ -import { Theme } from '../types'; +import type { Theme } from '../types'; export const THEMES: { id: Theme; gradient: string; name: string }[] = [ { id: 'light', gradient: 'bg-gradient-to-r from-gray-100 to-gray-200', name: 'Light' }, diff --git a/frontend/src/hooks/useCategories.ts b/frontend/src/hooks/useCategories.ts index ded3243..23f7e8b 100644 --- a/frontend/src/hooks/useCategories.ts +++ b/frontend/src/hooks/useCategories.ts @@ -1,6 +1,7 @@ import { useState, useEffect, useCallback } from 'react'; -import { categoryService, CategoryWithRemaining } from '../services'; -import { CreateCategoryRequest } from '../types'; +import { categoryService } from '../services'; +import type { CategoryWithRemaining } from '../services'; +import type { CreateCategoryRequest } from '../types'; import { showToast } from '../utils/toast'; import { showErrorToast } from '../utils/errorHandler'; diff --git a/frontend/src/hooks/useExpenses.ts b/frontend/src/hooks/useExpenses.ts index 0978490..e982e74 100644 --- a/frontend/src/hooks/useExpenses.ts +++ b/frontend/src/hooks/useExpenses.ts @@ -1,6 +1,6 @@ import { useState, useEffect, useCallback } from 'react'; import { expenseService } from '../services'; -import { Expense, CreateExpenseRequest } from '../types'; +import type { Expense, CreateExpenseRequest } from '../types'; import { showToast } from '../utils/toast'; import { showErrorToast } from '../utils/errorHandler'; diff --git a/frontend/src/hooks/useFamilyMembers.ts b/frontend/src/hooks/useFamilyMembers.ts index 2c7a83f..094d8ff 100644 --- a/frontend/src/hooks/useFamilyMembers.ts +++ b/frontend/src/hooks/useFamilyMembers.ts @@ -1,6 +1,6 @@ import { useState, useEffect, useCallback } from 'react'; import { familyService } from '../services'; -import { FamilyMember } from '../types'; +import type { FamilyMember } from '../types'; import { showErrorToast } from '../utils/errorHandler'; export function useFamilyMembers(familyId: number | null) { diff --git a/frontend/src/hooks/useInviteLink.ts b/frontend/src/hooks/useInviteLink.ts index 570d4e8..137e342 100644 --- a/frontend/src/hooks/useInviteLink.ts +++ b/frontend/src/hooks/useInviteLink.ts @@ -1,6 +1,6 @@ import { useState, useEffect, useCallback } from 'react'; import { inviteService } from '../services'; -import { InviteLinkResponse, CreateInviteLinkRequest } from '../types'; +import type { InviteLinkResponse, CreateInviteLinkRequest } from '../types'; import { showToast } from '../utils/toast'; import { showErrorToast } from '../utils/errorHandler'; diff --git a/frontend/src/hooks/useShoppingList.ts b/frontend/src/hooks/useShoppingList.ts index 96e95e5..72805fd 100644 --- a/frontend/src/hooks/useShoppingList.ts +++ b/frontend/src/hooks/useShoppingList.ts @@ -1,6 +1,6 @@ import { useState, useEffect, useCallback } from 'react'; import { shoppingService } from '../services'; -import { ShoppingItem, CreateShoppingItemRequest } from '../types'; +import type { ShoppingItem, CreateShoppingItemRequest } from '../types'; import { showToast } from '../utils/toast'; import { showErrorToast } from '../utils/errorHandler'; diff --git a/frontend/src/pages/Profile.tsx b/frontend/src/pages/Profile.tsx index f84919b..bd7efe2 100644 --- a/frontend/src/pages/Profile.tsx +++ b/frontend/src/pages/Profile.tsx @@ -5,9 +5,8 @@ import { User as UserIcon } from 'lucide-react'; import { familyApi, authApi } from '../api/client'; import { useStore } from '../store/useStore'; import { useFamilyMembers, useConfirm } from '../hooks'; -import { Theme } from '../types'; +import type { Theme } from '../types'; import { ProfileHeader } from '../components/profile/ProfileHeader'; -import { UserInfo } from '../components/profile/UserInfo'; import { FamilySection } from '../components/profile/FamilySection'; import { MembersSection } from '../components/profile/MembersSection'; import { SettingsSection } from '../components/profile/SettingsSection'; @@ -19,7 +18,7 @@ export default function Profile() { const { t, i18n } = useTranslation(); const navigate = useNavigate(); const { user, selectedFamily, setSelectedFamily, setUser, preferences, setPreferences } = useStore(); - const { members, loading: membersLoading, loadMembers } = useFamilyMembers(user?.family_id || null); + const { members, loading: membersLoading } = useFamilyMembers(user?.family_id || null); const { confirmState, confirm, cancel } = useConfirm(); const [leavingFamily, setLeavingFamily] = useState(false); @@ -61,17 +60,6 @@ export default function Profile() { } }; - const handleLogout = async () => { - try { - await authApi.logout(); - setUser(null); - setSelectedFamily(null); - navigate('/login'); - } catch (error) { - showErrorToast(error); - } - }; - const handleThemeChange = (theme: Theme) => { setPreferences({ ...preferences, theme }); showToast.success(t('profile.themeChanged')); diff --git a/frontend/src/services/categoryService.ts b/frontend/src/services/categoryService.ts index 86aaf25..c861029 100644 --- a/frontend/src/services/categoryService.ts +++ b/frontend/src/services/categoryService.ts @@ -1,5 +1,5 @@ import { categoryApi, expenseApi } from '../api/client'; -import { Category, CreateCategoryRequest, RemainingLimit } from '../types'; +import type { Category, CreateCategoryRequest } from '../types'; import { handleApiError } from '../utils/errorHandler'; export interface CategoryWithRemaining extends Category { diff --git a/frontend/src/services/expenseService.ts b/frontend/src/services/expenseService.ts index 355ad14..6d7f58e 100644 --- a/frontend/src/services/expenseService.ts +++ b/frontend/src/services/expenseService.ts @@ -1,5 +1,5 @@ import { expenseApi } from '../api/client'; -import { Expense, CreateExpenseRequest } from '../types'; +import type { Expense, CreateExpenseRequest } from '../types'; import { handleApiError } from '../utils/errorHandler'; export const expenseService = { diff --git a/frontend/src/services/familyService.ts b/frontend/src/services/familyService.ts index 31e24ad..cd0417f 100644 --- a/frontend/src/services/familyService.ts +++ b/frontend/src/services/familyService.ts @@ -1,5 +1,5 @@ import { familyApi } from '../api/client'; -import { Family, CreateFamilyRequest, CreateMyFamilyRequest, CreateMyFamilyResponse, VerifyFamilyPasswordRequest, FamilyMember } from '../types'; +import type { Family, CreateFamilyRequest, CreateMyFamilyRequest, CreateMyFamilyResponse, VerifyFamilyPasswordRequest, FamilyMember } from '../types'; import { handleApiError } from '../utils/errorHandler'; export const familyService = { diff --git a/frontend/src/services/inviteService.ts b/frontend/src/services/inviteService.ts index 54def6a..2872af6 100644 --- a/frontend/src/services/inviteService.ts +++ b/frontend/src/services/inviteService.ts @@ -1,5 +1,5 @@ import { inviteLinkApi } from '../api/client'; -import { CreateInviteLinkRequest, InviteLinkResponse, ValidateInviteResponse, JoinFamilyResponse } from '../types'; +import type { CreateInviteLinkRequest, InviteLinkResponse, ValidateInviteResponse, JoinFamilyResponse } from '../types'; import { handleApiError } from '../utils/errorHandler'; export const inviteService = { diff --git a/frontend/src/services/shoppingService.ts b/frontend/src/services/shoppingService.ts index e7e8790..f800122 100644 --- a/frontend/src/services/shoppingService.ts +++ b/frontend/src/services/shoppingService.ts @@ -1,5 +1,5 @@ import { shoppingItemApi } from '../api/client'; -import { ShoppingItem, CreateShoppingItemRequest, UpdateShoppingItemRequest, MarkAsPurchasedRequest } from '../types'; +import type { ShoppingItem, CreateShoppingItemRequest, UpdateShoppingItemRequest, MarkAsPurchasedRequest } from '../types'; import { handleApiError } from '../utils/errorHandler'; export const shoppingService = { diff --git a/frontend/src/store/useStore.ts b/frontend/src/store/useStore.ts index b2f34ce..b69eaaa 100644 --- a/frontend/src/store/useStore.ts +++ b/frontend/src/store/useStore.ts @@ -124,7 +124,7 @@ export const useStore = create((set, get) => ({ }, clearCache: () => { - set((state) => ({ + set(() => ({ cache: { categories: new Map(), members: new Map(), diff --git a/frontend/src/utils/errorHandler.ts b/frontend/src/utils/errorHandler.ts index ec2acd1..43adde3 100644 --- a/frontend/src/utils/errorHandler.ts +++ b/frontend/src/utils/errorHandler.ts @@ -1,5 +1,5 @@ import { AxiosError } from 'axios'; -import { ApiError, AppError } from '../types/errors'; +import { AppError } from '../types/errors'; import { showToast } from './toast'; export function handleApiError(error: unknown): never { -- 2.49.1