Added Automatic ZIP Completion

This commit is contained in:
2024-04-10 11:14:57 +02:00
parent bf04b9c563
commit bb158c1353
3 changed files with 29 additions and 19 deletions

View File

@@ -0,0 +1,11 @@
export const useZipCheck = async (zip) => {
const supabase = useSupabaseClient()
console.log((await supabase.from("citys").select().eq("zip",Number(zip)).maybeSingle()).data)
const result = (await supabase.from("citys").select().eq("zip",Number(zip)).maybeSingle()).data
return result ? result.short : null
}