mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 06:11:11 -05:00
Refactor: Improve validation schemas
This commit is contained in:
@@ -15,11 +15,13 @@ import { useProfile } from '@/hooks/useProfile';
|
||||
import { useUnitPreferences } from '@/hooks/useUnitPreferences';
|
||||
import { supabase } from '@/integrations/supabase/client';
|
||||
import { MapPin, Calendar, Globe, Accessibility, Ruler } from 'lucide-react';
|
||||
import { personalLocationSchema } from '@/lib/validation';
|
||||
|
||||
const locationSchema = z.object({
|
||||
preferred_pronouns: z.string().max(20).optional(),
|
||||
timezone: z.string(),
|
||||
preferred_language: z.string(),
|
||||
personal_location: z.string().max(100).optional(),
|
||||
personal_location: personalLocationSchema,
|
||||
home_park_id: z.string().optional()
|
||||
});
|
||||
type LocationFormData = z.infer<typeof locationSchema>;
|
||||
|
||||
Reference in New Issue
Block a user