From 3abd16fd3251f5031f6d5b7840d7d90f3da39877 Mon Sep 17 00:00:00 2001 From: Lateefat Abdullahi Date: Tue, 30 Jun 2026 00:33:28 +0100 Subject: [PATCH 1/2] feat(profile): add dark mode support to profile page --- src/app/globals.css | 5 ++ .../profile/components/AchievementsPanel.tsx | 12 +-- .../profile/components/CertificatesPanel.tsx | 2 +- .../components/CustomerSupportPanel.tsx | 48 +++++----- src/app/profile/components/ProfileHeader.tsx | 6 +- .../profile/components/ProfileInfoPanel.tsx | 26 +++--- .../components/ProfilePanelSkeleton.tsx | 10 +-- src/app/profile/components/ProfileTabs.tsx | 6 +- src/app/profile/components/SettingsPanel.tsx | 49 ++++++---- src/app/profile/page.tsx | 2 +- src/components/profile/PreferencesSection.tsx | 89 ++++++++++--------- src/components/profile/ProfileEditForm.tsx | 10 +-- tailwind.config.js | 1 + 13 files changed, 150 insertions(+), 116 deletions(-) diff --git a/src/app/globals.css b/src/app/globals.css index ffe3d807..8b13cf38 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -39,6 +39,11 @@ html.a11y-high-contrast body { } } +html.dark { + --background: #111827; + --foreground: #f9fafb; +} + body { background: var(--background); color: var(--foreground); diff --git a/src/app/profile/components/AchievementsPanel.tsx b/src/app/profile/components/AchievementsPanel.tsx index 842b71eb..6b3637c7 100644 --- a/src/app/profile/components/AchievementsPanel.tsx +++ b/src/app/profile/components/AchievementsPanel.tsx @@ -10,13 +10,13 @@ interface AchievementCardProps { const AchievementCard = memo(function AchievementCard({ achievement }: AchievementCardProps) { return ( -
+
-

{achievement.title}

-

{achievement.description}

-

{achievement.earnedAt}

+

{achievement.title}

+

{achievement.description}

+

{achievement.earnedAt}

); }); @@ -27,9 +27,9 @@ function AchievementsPanel() { id="achievements-panel" role="tabpanel" aria-labelledby="achievements-tab" - className="rounded-lg bg-white p-6 shadow" + className="rounded-lg bg-white dark:bg-gray-800 p-6 shadow transition-colors duration-200" > -

Achievements

+

Achievements

{achievements.map((achievement) => ( diff --git a/src/app/profile/components/CertificatesPanel.tsx b/src/app/profile/components/CertificatesPanel.tsx index bd744238..68385a7e 100644 --- a/src/app/profile/components/CertificatesPanel.tsx +++ b/src/app/profile/components/CertificatesPanel.tsx @@ -50,7 +50,7 @@ function CertificatesPanel() { id="certificates-panel" role="tabpanel" aria-labelledby="certificates-tab" - className="rounded-lg bg-white p-6 shadow dark:bg-gray-900" + className="rounded-lg bg-white dark:bg-gray-800 p-6 shadow transition-colors duration-200" >

diff --git a/src/app/profile/components/CustomerSupportPanel.tsx b/src/app/profile/components/CustomerSupportPanel.tsx index 39505250..d8ec1a8c 100644 --- a/src/app/profile/components/CustomerSupportPanel.tsx +++ b/src/app/profile/components/CustomerSupportPanel.tsx @@ -20,7 +20,7 @@ function FaqItem({ id, question, answer }: FaqItemProps) { const toggle = useCallback(() => setIsOpen((prev) => !prev), []); return ( -

+

@@ -44,7 +44,7 @@ function FaqItem({ id, question, answer }: FaqItemProps) { role="region" aria-labelledby={headingId} hidden={!isOpen} - className="px-4 pb-4 text-sm text-gray-600 leading-relaxed" + className="px-4 pb-4 text-sm text-gray-600 dark:text-gray-300 leading-relaxed" > {answer}
@@ -78,15 +78,15 @@ function ContactForm() {
-

+

✅ Your message has been sent. We'll get back to you within 24 hours.

@@ -97,7 +97,7 @@ function ContactForm() { return (
-
-