diff options
Diffstat (limited to 'src/pages/tones.tsx')
-rw-r--r-- | src/pages/tones.tsx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/pages/tones.tsx b/src/pages/tones.tsx index 1a1e908..96ed56c 100644 --- a/src/pages/tones.tsx +++ b/src/pages/tones.tsx @@ -1,18 +1,19 @@ -import { Suspense } from 'react'; -import { fetchWordsByToneAndSyllables } from '@/actions/tones'; -import ToneSelectorClient from '@/components/tones/ToneSelectorClient'; -import { Skeleton } from '@/components/ui/skeleton'; // For Suspense fallback +import { Suspense } from "react"; +import { fetchWordsByToneAndSyllables } from "@/actions/tones"; +import ToneSelectorClient from "@/components/tones/ToneSelectorClient"; +import { Skeleton } from "@/components/ui/skeleton"; // For Suspense fallback export const getConfig = async () => { return { - render: 'static', // Or 'dynamic' if you prefer SSR for every request + render: "static", // Or 'dynamic' if you prefer SSR for every request }; }; // Function to fetch the initial word on the server async function InitialWordLoader() { // Fetch a random 1-syllable Thai word with any tone initially - const initialWord = await fetchWordsByToneAndSyllables(1, [null]); + const initialWord = await fetchWordsByToneAndSyllables(["rising", "mid"]); + console.log({ initialWord }); return <ToneSelectorClient initialWord={initialWord} />; } @@ -23,7 +24,7 @@ function TonePageSkeleton() { <div className="mb-6 p-6 border rounded-lg shadow"> <Skeleton className="h-8 w-1/2 mb-4" /> <Skeleton className="h-6 w-3/4 mb-6" /> - + <div className="space-y-6"> <div> <Skeleton className="h-6 w-1/4 mb-2" /> @@ -45,7 +46,6 @@ function TonePageSkeleton() { ); } - export default function TonesPage() { return ( <div className="py-8"> @@ -57,6 +57,6 @@ export default function TonesPage() { } export const metadata = { - title: 'Thai Tone Explorer', - description: 'Explore Thai words by syllable count and tones.', + title: "Thai Tone Explorer", + description: "Explore Thai words by syllable count and tones.", }; |