Bug: ProfileSection timezone select is not saved or persisted
Location
src/settings/ProfileSection.jsx:302-317
Description
The timezone <select> dropdown uses defaultValue="" but its value is never stored in state, never sent to the backend on save, and resets on page reload:
// Line 304 — no state binding, no onChange handler
<select className="settings-select" defaultValue="">
<option value="" disabled>Select your timezone</option>
...
</select>
The handleSave function (line 137) only sends display_name:
body: JSON.stringify({ display_name: displayName }),
Impact
- User selects a timezone, clicks "Save Changes" — timezone is silently dropped
- On page reload, timezone resets to "Select your timezone" placeholder
- Backend has no
/api/user/profile timezone field
Fix
- Add
timezone state: const [timezone, setTimezone] = useState('');
- Bind select:
value={timezone} onChange={(e) => setTimezone(e.target.value)}
- Include in save payload:
body: JSON.stringify({ display_name: displayName, timezone })
- Fetch timezone in
fetchProfile(): if (data.timezone) setTimezone(data.timezone)
- Backend: Add
timezone column to profiles table in Supabase, update PUT /api/user/profile to accept and store it
Bug: ProfileSection timezone select is not saved or persisted
Location
src/settings/ProfileSection.jsx:302-317Description
The timezone
<select>dropdown usesdefaultValue=""but its value is never stored in state, never sent to the backend on save, and resets on page reload:The
handleSavefunction (line 137) only sendsdisplay_name:Impact
/api/user/profiletimezone fieldFix
timezonestate:const [timezone, setTimezone] = useState('');value={timezone} onChange={(e) => setTimezone(e.target.value)}body: JSON.stringify({ display_name: displayName, timezone })fetchProfile():if (data.timezone) setTimezone(data.timezone)timezonecolumn toprofilestable in Supabase, updatePUT /api/user/profileto accept and store it