From 2401217a4019938d1c1cc61b6e33ccb233eb6e74 Mon Sep 17 00:00:00 2001
From: polwex <polwex@sortug.com>
Date: Tue, 3 Jun 2025 09:34:29 +0700
Subject: this is golden thanks claude

---
 src/pages/tones.tsx | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

(limited to 'src/pages/tones.tsx')

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.",
 };
-- 
cgit v1.2.3

