From 7f2cdbe5da583010466d725197137f503e1fb771 Mon Sep 17 00:00:00 2001 From: polwex Date: Sat, 16 Aug 2025 15:50:10 +0700 Subject: damn good --- src/components/tones/ToneSelectorClient.tsx | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'src/components/tones/ToneSelectorClient.tsx') diff --git a/src/components/tones/ToneSelectorClient.tsx b/src/components/tones/ToneSelectorClient.tsx index 8abbd38..438fc8a 100644 --- a/src/components/tones/ToneSelectorClient.tsx +++ b/src/components/tones/ToneSelectorClient.tsx @@ -1,6 +1,7 @@ "use client"; import { Spinner } from "@/components/ui/spinner"; +import "../Flashcard/cards.css"; import { useState, useEffect, useTransition, useRef, useCallback } from "react"; import { WordData } from "@/zoom/logic/types"; import { @@ -25,7 +26,7 @@ import { } from "@/components/ui/card"; import { Label } from "@/components/ui/label"; import { Skeleton } from "@/components/ui/skeleton"; // For loading state -import { MutationOrder, ToneQuery } from "@/lib/types/phonetics"; +import { MutationOrder, PhoneticData, ToneQuery } from "@/lib/types/phonetics"; import { ProsodySyllable } from "@/lib/types/cards"; import { ArrowLeft, ArrowRight, Volume2, FlipHorizontal2 } from "lucide-react"; @@ -131,9 +132,10 @@ export default function ToneSelectorClient({ initialData, initialTones, }: { - initialData: any[]; + initialData: PhoneticData[]; initialTones: ToneQuery; }) { + console.log({ initialData }); const [data, setData] = useState(initialData); const [currentIdx, setCurrentIdx] = useState(0); const [isLoading, startTransition] = useTransition(); @@ -187,7 +189,7 @@ export default function ToneSelectorClient({ } type IProps = { isLoading: boolean; - currentWord: any; + currentWord: PhoneticData; goPrev: () => void; goNext: () => void; }; @@ -225,6 +227,7 @@ function Inner({ isLoading, currentWord, goPrev, goNext }: IProps) { ); } + console.log({ currentWord }); return (
@@ -242,7 +245,10 @@ function Inner({ isLoading, currentWord, goPrev, goNext }: IProps) { }`} > {/* Front */} -
+

Current Word

@@ -256,7 +262,10 @@ function Inner({ isLoading, currentWord, goPrev, goNext }: IProps) {
{/* Back */} -
+

Details

-- cgit v1.2.3