'use client'; import { AlignInfoFillIcon as IconInfoCustomFill } from '@/components/misc/alignui-icons'; import * as React from 'react'; import { Info } from 'lucide-react'; import * as Avatar from '@/components/ui/avatar'; import * as Button from '@/components/ui/button'; import * as Divider from '@/components/ui/divider'; import * as Drawer from '@/components/ui/drawer'; import * as Hint from '@/components/ui/hint'; import * as Input from '@/components/ui/input'; import * as Label from '@/components/ui/label'; import * as Select from '@/components/ui/select'; import * as Textarea from '@/components/ui/textarea'; import Image from 'next/image'; const timezones = [ { value: 'gmt-12', label: 'GMT-12:00 - Baker Island Time' }, { value: 'gmt-8', label: 'GMT-8:00 - Pacific Standard Time' }, { value: 'gmt-5', label: 'GMT-5:00 - Eastern Standard Time' }, { value: 'gmt-4', label: 'GMT-4:00 - Atlantic Standard Time' }, { value: 'gmt0', label: 'GMT+0:00 - Greenwich Mean Time' }, { value: 'gmt1', label: 'GMT+1:00 - Central European Time' }, { value: 'gmt3', label: 'GMT+3:00 - Eastern European Time' }, { value: 'gmt8', label: 'GMT+8:00 - China Standard Time' }, ]; const languages = [ { value: 'en', label: 'English (US)', flag: 'US' }, { value: 'de', label: 'Deutsch', flag: 'DE' }, { value: 'fr', label: 'Français', flag: 'FR' }, { value: 'tr', label: 'Türkçe', flag: 'TR' }, ]; export default function ProfileEditDrawer() { const [open, setOpen] = React.useState(false); const [selectedTimezone, setSelectedTimezone] = React.useState('gmt-4'); const [selectedLanguage, setSelectedLanguage] = React.useState('en'); const [biography, setBiography] = React.useState(''); return (
Open Profile
Profile UPLOAD IMAGE {/* Avatar Upload */}
Upload Image
Min 400x400px, PNG or JPEG
Upload
INFORMATION {/* Form Fields */}
Full Name
Title
Biography (Optional) setBiography(e.target.value)} maxLength={200} > It will be displayed on your profile.
REGIONAL PREFERENCES
Timezone {' '} { timezones.find((tz) => tz.value === selectedTimezone) ?.label } {timezones.map((timezone) => ( {timezone.label} ))}
Language
lang.value === selectedLanguage)?.flag}.svg`} className='size-5 rounded-sm' alt='' width={20} height={20} /> { languages.find( (lang) => lang.value === selectedLanguage, )?.label }
{languages.map((language) => ( {language.label} ))}
setOpen(false)} > Discard setOpen(false)} > Apply Changes
); }