Skip to content

Commit f9b90ca

Browse files
Fix TypeScript/ESLint errors for successful deployment
- Remove unused GitFork import from GitHubButton component - Remove console.log statement that violated no-console rule - Remove unused AnimatePresence import from Toast component - Fix React Hook dependency order in ToastContext - Remove unused error parameter from catch block All linting and type checking now passes successfully. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 85daaaa commit f9b90ca

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

src/components/GitHubButton.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use client';
22

33
import { useState, useEffect } from 'react';
4-
import { Star, GitFork } from 'lucide-react';
4+
import { Star } from 'lucide-react';
55
import { motion } from 'framer-motion';
66
import { cn } from '@/lib/utils';
77

@@ -30,8 +30,7 @@ export function GitHubButton() {
3030
stars: data.stargazers_count ?? 0,
3131
forks: data.forks_count ?? 0,
3232
});
33-
} catch (error) {
34-
console.log('GitHub API fetch failed, using fallback values:', error);
33+
} catch {
3534
// Use realistic fallback values that won't be confused with real data
3635
setStats({ stars: 1, forks: 0 });
3736
} finally {

src/components/Toast.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client';
22

3-
import { motion, AnimatePresence } from 'framer-motion';
3+
import { motion } from 'framer-motion';
44
import { CheckCircle, Info, AlertCircle, X } from 'lucide-react';
55
import { useEffect } from 'react';
66

src/contexts/ToastContext.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ export function useToast() {
2222
export function ToastProvider({ children }: { children: React.ReactNode }) {
2323
const [toasts, setToasts] = useState<ToastProps[]>([]);
2424

25+
const removeToast = useCallback((id: string) => {
26+
setToasts(prev => prev.filter(toast => toast.id !== id));
27+
}, []);
28+
2529
const showToast = useCallback((toast: Omit<ToastProps, 'id' | 'onRemove'>) => {
2630
const id = Math.random().toString(36).substring(2, 9);
2731
const newToast: ToastProps = {
@@ -30,11 +34,7 @@ export function ToastProvider({ children }: { children: React.ReactNode }) {
3034
onRemove: removeToast,
3135
};
3236
setToasts(prev => [...prev, newToast]);
33-
}, []);
34-
35-
const removeToast = useCallback((id: string) => {
36-
setToasts(prev => prev.filter(toast => toast.id !== id));
37-
}, []);
37+
}, [removeToast]);
3838

3939
return (
4040
<ToastContext.Provider value={{ showToast, removeToast }}>

0 commit comments

Comments
 (0)