feat: initial commit

This commit is contained in:
2026-04-12 01:20:57 +07:00
parent 10d660cbcb
commit 28e866a64e
43 changed files with 954 additions and 0 deletions

16
src/hooks/use-vocab.ts Normal file
View File

@@ -0,0 +1,16 @@
import { useQuery } from "@tanstack/react-query"
import { supabase } from "@/lib/supabase"
export function useVocab(topic?: string) {
return useQuery({
queryKey: ["vocab", topic],
queryFn: async () => {
let query = supabase.from("vocab").select("*")
if (topic) query = query.eq("topic", topic.toLowerCase())
const { data, error } = await query
if (error) throw error
return data
},
enabled: false, // Enabled during feature implementation
})
}