fediversion/frontend/components/ui/attendance-button.tsx
fullsizemalt b4cddf41ea feat: Initialize Fediversion multi-band platform
- Fork elmeg-demo codebase for multi-band support
- Add data importer infrastructure with base class
- Create band-specific importers:
  - phish.py: Phish.net API v5
  - grateful_dead.py: Grateful Stats API
  - setlistfm.py: Dead & Company, Billy Strings (Setlist.fm)
- Add spec-kit configuration for Gemini
- Update README with supported bands and architecture
2025-12-28 12:39:28 -08:00

42 lines
1.2 KiB
TypeScript

import { useState } from "react"
import { Button } from "@/components/ui/button"
import { CheckCircle2, Circle } from "lucide-react"
import { cn } from "@/lib/utils"
interface AttendanceButtonProps {
initialAttended?: boolean
onToggle?: (attended: boolean) => void
}
export function AttendanceButton({ initialAttended = false, onToggle }: AttendanceButtonProps) {
const [attended, setAttended] = useState(initialAttended)
const handleClick = () => {
const newState = !attended
setAttended(newState)
onToggle?.(newState)
}
return (
<Button
variant={attended ? "default" : "outline"}
className={cn(
"gap-2 transition-all",
attended ? "bg-green-600 hover:bg-green-700" : ""
)}
onClick={handleClick}
>
{attended ? (
<>
<CheckCircle2 className="h-4 w-4" />
I Was There
</>
) : (
<>
<Circle className="h-4 w-4" />
I Was There
</>
)}
</Button>
)
}