perf: complete performance audit optimizations

This commit is contained in:
2026-02-26 22:17:56 -05:00
parent c9a260ab23
commit a8eaad7f35
14 changed files with 439 additions and 33 deletions

View File

@ -18,14 +18,14 @@ export const businessService = {
/** Get all businesses */
async getAllBusinesses(): Promise<Business[]> {
const { data, error } = await supabase.from('businesses').select('*')
const { data, error } = await supabase.from('businesses').select('id, name, address, phone, image_url, social_media, category, latitude, longitude, area, updated_at')
if (error) throw new Error(error.message)
return data as Business[]
},
/** Get a single business by ID */
async getBusiness(id: string): Promise<Business> {
const { data, error } = await supabase.from('businesses').select('*').eq('id', id).single()
const { data, error } = await supabase.from('businesses').select('id, name, address, phone, image_url, social_media, category, latitude, longitude, area, updated_at').eq('id', id).single()
if (error) throw new Error(error.message)
return data as Business
},