mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 11:51:14 -05:00
Remove date of birth fields
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user