// This is a Server Component import React from "react"; import db from "@/lib/db"; import { Card, CardHeader, CardDescription, CardContent, CardFooter, CardTitle, } from "@/components/ui/card"; import { NLP } from "sortug-ai"; import { BookOpen, Volume2, Link as LinkIcon, ChevronDown, ChevronUp, Search, Info, MessageSquareQuote, Tags, ListTree, Lightbulb, } from "lucide-react"; import { Example, SubSense, RelatedEntry, Sense, WordData, } from "@/zoom/logic/types"; import { isTonal } from "@/lib/lang/utils"; type WordProps = { text: string; lang: string }; export default async function (props: WordProps) { const { text, lang } = props; const data = db.fetchWordBySpelling(text, lang); if (!data) return

oh...

; console.log(data.senses[0]); return (

{text}

{isTonal(text) ? : }
); // return ( //
//

{word}

//

${word.}

//

{word}

//

// Content rendered on the server at: {new Date().toLocaleTimeString()} //

//
// ); } // Helper component for IPA display const IpaDisplay = ({ ipaEntries, }: { ipaEntries: Array<{ ipa: string; tags?: string[] }>; }) => { if (!ipaEntries || ipaEntries.length === 0) return null; return (
{ipaEntries.map((entry, index) => { const tags = entry.tags ? entry.tags : []; return ( {entry.ipa}{" "} {tags.length > 0 && ( ({tags.join(", ")}) )} ); })}
); }; function Tones({ text, lang }: WordProps) { return
; } function NotTones({ text, lang }: WordProps) { return
; }