diff --git a/client/src/components/classes/class-card.tsx b/client/src/components/classes/class-card.tsx index 3bea44f..e5e501f 100644 --- a/client/src/components/classes/class-card.tsx +++ b/client/src/components/classes/class-card.tsx @@ -1,44 +1,17 @@ import { Class } from "@shared/schema"; -import { useAuth } from "@/hooks/use-auth"; -import { useState } from "react"; -import { useToast } from "@/hooks/use-toast"; -import { useLocation } from "wouter"; import FadiaGroupClassImage from "../../assets/Fadia-15.jpg"; import FadiaSmallGroupClassImage from "../../assets/Fadia-156.jpg"; import FadiaPrivateClassImage from "../../assets/Fadia-132.jpg"; interface ClassCardProps { classData: Class; - onBookClick: (classId: number) => void; } -export function ClassCard({ classData, onBookClick }: ClassCardProps) { - const { user } = useAuth(); - const { toast } = useToast(); - const [_, setLocation] = useLocation(); - - const formatPrice = (price: number) => { - return `$${(price / 100).toFixed(2)}`; - }; - +export function ClassCard({ classData }: ClassCardProps) { const formatDuration = (minutes: number) => { return `${minutes} minutes`; }; - const handleBookNow = () => { - if (!user) { - toast({ - title: "Authentication required", - description: "Please login or sign up to book a class", - variant: "destructive" - }); - setLocation("/auth"); - return; - } - - onBookClick(classData.id); - }; - // Determine badge color based on class type const badgeColor = () => { switch (classData.classType) { @@ -49,11 +22,6 @@ export function ClassCard({ classData, onBookClick }: ClassCardProps) { } }; - // All buttons use teal as the primary color - const buttonColor = () => { - return "bg-teal text-white"; - }; - // Format class type for display const formatClassType = (type: string) => { switch (type) { @@ -91,18 +59,11 @@ export function ClassCard({ classData, onBookClick }: ClassCardProps) {
{classData.description}
-