What needs to be built?
Replace the settings placeholder page with the full settings layout. The page displays a Notification Preferences card with email/SMS toggles and an SMS Consent card (only when SMS is enabled). Toggling a preference calls the update action and shows toast feedback.
Design reference
Figma link: https://www.figma.com/design/O8reTcdtMARvnTzCtlsvmp/Paso-Food-Co-Op?node-id=407-4433&p=f&t=wZjCheHOOyiYBbH4-0
Documentation
Existing patterns:
Component dependencies (must be merged first):
src/components/settings/notification-preferences-card.tsx - toggle card
src/components/settings/sms-consent-card.tsx - consent card
Official docs:
Technical notes
Replace src/app/(protected)/settings/page.tsx and create src/app/(protected)/settings/settings-content.tsx.
Server component (page.tsx):
- Fetch user preferences using
fetchUserPreferences()
- Fetch SMS consent using
fetchSmsConsent()
- Fetch profile for phone number using
fetchProfile()
- Check SMS_ENABLED feature flag
- Pass data to
SettingsContent
Client component (settings-content.tsx):
- "Settings" heading in Angkor font
NotificationPreferencesCard with current toggle states
- Toggle fires
updateUserPreferencesAction and shows toast
- SMS toggle only visible when
SMS_ENABLED=true
SmsConsentCard only rendered when SMS_ENABLED=true
- Revoke fires
revokeSmsConsentAction and shows toast
- Phone number passed from profile data
Acceptance criteria
What needs to be built?
Replace the settings placeholder page with the full settings layout. The page displays a Notification Preferences card with email/SMS toggles and an SMS Consent card (only when SMS is enabled). Toggling a preference calls the update action and shows toast feedback.
Design reference
Figma link: https://www.figma.com/design/O8reTcdtMARvnTzCtlsvmp/Paso-Food-Co-Op?node-id=407-4433&p=f&t=wZjCheHOOyiYBbH4-0
Documentation
Existing patterns:
src/app/(protected)/settings/page.tsx- current placeholder pagesrc/actions/settings.ts-fetchUserPreferences(),updateUserPreferencesAction(),fetchSmsConsent(),revokeSmsConsentAction()src/actions/profile.ts-fetchProfile()for phone numberComponent dependencies (must be merged first):
src/components/settings/notification-preferences-card.tsx- toggle cardsrc/components/settings/sms-consent-card.tsx- consent cardOfficial docs:
Technical notes
Replace
src/app/(protected)/settings/page.tsxand createsrc/app/(protected)/settings/settings-content.tsx.Server component (
page.tsx):fetchUserPreferences()fetchSmsConsent()fetchProfile()SettingsContentClient component (
settings-content.tsx):NotificationPreferencesCardwith current toggle statesupdateUserPreferencesActionand shows toastSMS_ENABLED=trueSmsConsentCardonly rendered whenSMS_ENABLED=truerevokeSmsConsentActionand shows toastAcceptance criteria
updateUserPreferencesActionrevokeSmsConsentActionrevalidatePath("/settings")called after mutationsnpm run buildpassesnpm run lintpasses