From 3b62841bd40e8f304ddd238f5e882c7fe3a63b1e Mon Sep 17 00:00:00 2001 From: Mannu Date: Sat, 23 May 2026 19:26:38 +0530 Subject: [PATCH] fix(settings/profile): align My Profile page with app theme MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Background: flat gray → rose-to-amber gradient (matches all other pages) - Header: add back button with rounded-xl pill style + xl font title - Buttons: bg-pink-500 → bg-rose-400 throughout - Loading: spinner → branded emoji bounce (consistent with home screen) - Toggle: checkbox → styled toggle switch matching app UI language - Layout: remove desktop max-w-lg wrapper; full-width mobile layout - Input styling: unified inputClass with focus ring + consistent padding - Empty state: plain text → emoji + two-line message - Product rows: border div → bg-gray-50 pill card (matches wardrobe style) - Add pb-24 so content clears the bottom nav bar Co-Authored-By: Claude Sonnet 4.6 --- src/app/settings/profile/page.tsx | 102 ++++++++++++++++++------------ 1 file changed, 60 insertions(+), 42 deletions(-) diff --git a/src/app/settings/profile/page.tsx b/src/app/settings/profile/page.tsx index ef9579f..82b0918 100644 --- a/src/app/settings/profile/page.tsx +++ b/src/app/settings/profile/page.tsx @@ -1,5 +1,7 @@ "use client"; + import { useEffect, useState } from "react"; +import { useRouter } from "next/navigation"; interface Profile { id: string; @@ -25,19 +27,18 @@ const CATEGORIES = ["general", "feeding", "sleep", "play", "clothing"] as const; const CATEGORY_EMOJI: Record = { feeding: "🍼", sleep: "💤", play: "🎮", clothing: "👗", general: "🛍️" }; export default function ProfileSettingsPage() { + const router = useRouter(); const [profile, setProfile] = useState(null); const [products, setProducts] = useState([]); const [loading, setLoading] = useState(true); const [saving, setSaving] = useState(false); const [saveMsg, setSaveMsg] = useState(""); - // form state const [slug, setSlug] = useState(""); const [displayName, setDisplayName] = useState(""); const [bio, setBio] = useState(""); const [isPublic, setIsPublic] = useState(false); - // product form const [showAddProduct, setShowAddProduct] = useState(false); const [editingProduct, setEditingProduct] = useState(null); const [pTitle, setPTitle] = useState(""); @@ -139,36 +140,47 @@ export default function ProfileSettingsPage() { const slugValid = /^[a-z0-9-]{3,40}$/.test(slug); const baseUrl = typeof window !== "undefined" ? window.location.origin : ""; + const inputClass = "w-full border border-gray-200 dark:border-gray-600 rounded-xl px-3 py-2.5 text-sm bg-white dark:bg-gray-700 dark:text-white focus:outline-none focus:ring-2 focus:ring-rose-300"; + if (loading) return ( -
-
+
+
+ {["🍼", "😴", "🚼", "👶"].map((e, i) => ( + {e} + ))} +
+

Loading profile…

); return ( -
-
-

My Profile Page

+
+ {/* Header */} +
+ +

My Profile Page

+
+
{/* Profile section */} -
+

Profile

- + setDisplayName(e.target.value)} - className="w-full border dark:border-gray-600 rounded-xl px-3 py-2 text-sm dark:bg-gray-700 dark:text-white mb-3" + className={`${inputClass} mb-3`} placeholder="Priya Sharma" /> - -
- {baseUrl}/m/ + +
+ {baseUrl}/m/ setSlug(e.target.value.toLowerCase().replace(/[^a-z0-9-]/g, ""))} - className="flex-1 bg-transparent outline-none dark:text-white" + className="flex-1 bg-transparent outline-none dark:text-white text-sm" placeholder="priya-sharma" />
@@ -176,47 +188,49 @@ export default function ProfileSettingsPage() {

3–40 chars, lowercase letters, numbers, hyphens only

)} - +