"use client"; import { CardResponse } from "@/lib/types/cards"; // export default function ({ user }: { user: { name: string; id: number } }) { // const [state, formAction, isPending] = useActionState(postLogout, 0); // return ( //
// // // Profile // {state} // // //

Username: {user.name}

//

User ID: {user.id}

//
// // // //
//
// ); // } // "use client"; // --- Flashcard Component --- interface FlashcardProps { data: CardResponse; isFlipped: boolean; onFlip: () => void; animationDirection: | "enter-left" | "enter-right" | "exit-left" | "exit-right" | "none"; } const Flashcard: React.FC = ({ data, isFlipped, onFlip, animationDirection, }) => { const getAnimationClass = () => { switch (animationDirection) { case "enter-right": return "animate-slide-in-right"; case "enter-left": return "animate-slide-in-left"; case "exit-right": return "animate-slide-out-right"; case "exit-left": return "animate-slide-out-left"; default: return ""; } }; return (
{/* Front of the card */}
{data.expression.ipa.map((ip, i) => ( {ip.ipa} ))}

{data.expression.spelling}

{" "} {/* Placeholder for spacing, mimics bottom controls */} Flip
{/* Back of the card */}
{data.expression.senses.map((ss, i) => (
{ss.senses.map((sss, i) => (
{sss.glosses.map((ssss, i) => (

{ssss}

))}
))}
))}

{data.note}

Flip
); }; export default Flashcard;