This commit is contained in:
Your Name committed 2026-06-15 04:18:55 -04:00
1 parent bce5c48b59
commit 2098548140
4 files changed
+67715 -85

No files matched your search

+12 -49
View File
@@ -20,6 +20,7 @@ import {
Mail,
Award
} from 'lucide-react'
import { ThaiAddressInput } from '../components/ui/ThaiAddressInput'
export default function ProfilePage() {
const { token, customer, setAuth } = useAuthStore()
@@ -580,56 +581,18 @@ export default function ProfilePage() {
/>
</div>
<div className="grid grid-cols-2 md:grid-cols-4 gap-4">
<div className="space-y-1.5">
<label className="text-[10px] uppercase font-bold tracking-widest text-spa-stone/80">แขวง / ตำบล</label>
<input
type="text"
required
value={subdistrict}
onChange={e => setSubdistrict(e.target.value)}
className="w-full bg-spa-light border border-spa-stone/20 rounded-lg p-2.5 text-xs text-pop-black focus:border-spa-forest outline-none transition-all"
/>
</div>
<div className="space-y-1.5">
<label className="text-[10px] uppercase font-bold tracking-widest text-spa-stone/80">เขต / อำเภอ</label>
<input
type="text"
required
value={district}
onChange={e => setDistrict(e.target.value)}
className="w-full bg-spa-light border border-spa-stone/20 rounded-lg p-2.5 text-xs text-pop-black focus:border-spa-forest outline-none transition-all"
/>
</div>
<div className="space-y-1.5">
<label className="text-[10px] uppercase font-bold tracking-widest text-spa-stone/80">จังหวัด</label>
<input
type="text"
required
value={province}
onChange={e => setProvince(e.target.value)}
className="w-full bg-spa-light border border-spa-stone/20 rounded-lg p-2.5 text-xs text-pop-black focus:border-spa-forest outline-none transition-all"
/>
</div>
<div className="space-y-1.5">
<label className="text-[10px] uppercase font-bold tracking-widest text-spa-stone/80">รหัสไปรษณีย์</label>
<input
type="text"
required
maxLength={5}
value={zipcode}
onChange={e => setZipcode(e.target.value.replace(/\D/g, ''))}
className="w-full bg-spa-light border border-spa-stone/20 rounded-lg p-2.5 text-xs text-pop-black focus:border-spa-forest outline-none transition-all"
/>
</div>
</div>
<ThaiAddressInput
value={{ subdistrict, district, province, zipcode }}
onChange={(val) => {
setSubdistrict(val.subdistrict);
setDistrict(val.district);
setProvince(val.province);
setZipcode(val.zipcode);
}}
/>
<div className="flex items-center gap-2.5 py-1">
<input
type="checkbox"
<input
type="checkbox"
id="isDefault"
checked={isDefault}
onChange={e => setIsDefault(e.target.checked)}