import React from 'react'; import { IonButton, IonIcon, IonSpinner } from '@ionic/react'; import { checkmarkOutline, ellipseOutline, flameOutline, trashOutline, } from 'ionicons/icons'; import { useHistory } from 'react-router-dom'; import type { Tables } from '../database.types'; interface HabitCardProps { habit: Tables<'habits'>; completedToday: boolean; currentStreak: number; completionRate: number; onToggle: () => void; onDelete: () => void; busy: boolean; } const HabitCard: React.FC = ({ habit, completedToday, currentStreak, completionRate, onToggle, onDelete, busy, }) => { const history = useHistory(); return (
{ e.stopPropagation(); onDelete(); }} disabled={busy} >
); }; export default HabitCard;