Remove date of birth fields

This commit is contained in:
gpt-engineer-app[bot]
2025-09-28 20:20:59 +00:00
parent a1f57559f1
commit 3457bca7cf

View File

@@ -15,7 +15,6 @@ import { supabase } from '@/integrations/supabase/client';
import { MapPin, Calendar, Globe, Accessibility } from 'lucide-react'; import { MapPin, Calendar, Globe, Accessibility } from 'lucide-react';
const locationSchema = z.object({ const locationSchema = z.object({
date_of_birth: z.string().optional(),
preferred_pronouns: z.string().max(20).optional(), preferred_pronouns: z.string().max(20).optional(),
timezone: z.string(), timezone: z.string(),
preferred_language: z.string(), preferred_language: z.string(),
@@ -44,7 +43,6 @@ export function LocationTab() {
const form = useForm<LocationFormData>({ const form = useForm<LocationFormData>({
resolver: zodResolver(locationSchema), resolver: zodResolver(locationSchema),
defaultValues: { defaultValues: {
date_of_birth: profile?.date_of_birth || '',
preferred_pronouns: profile?.preferred_pronouns || '', preferred_pronouns: profile?.preferred_pronouns || '',
timezone: profile?.timezone || 'UTC', timezone: profile?.timezone || 'UTC',
preferred_language: profile?.preferred_language || 'en', preferred_language: profile?.preferred_language || 'en',
@@ -102,7 +100,6 @@ export function LocationTab() {
const { error } = await supabase const { error } = await supabase
.from('profiles') .from('profiles')
.update({ .update({
date_of_birth: data.date_of_birth || null,
preferred_pronouns: data.preferred_pronouns || null, preferred_pronouns: data.preferred_pronouns || null,
timezone: data.timezone, timezone: data.timezone,
preferred_language: data.preferred_language, preferred_language: data.preferred_language,
@@ -258,17 +255,6 @@ export function LocationTab() {
</CardDescription> </CardDescription>
</CardHeader> </CardHeader>
<CardContent className="space-y-6"> <CardContent className="space-y-6">
<div className="space-y-2">
<Label htmlFor="date_of_birth">Date of Birth</Label>
<Input
id="date_of_birth"
type="date"
{...form.register('date_of_birth')}
/>
<p className="text-sm text-muted-foreground">
Used to calculate your age if you choose to display it.
</p>
</div>
<div className="space-y-2"> <div className="space-y-2">
<Label htmlFor="preferred_pronouns">Preferred Pronouns</Label> <Label htmlFor="preferred_pronouns">Preferred Pronouns</Label>