From 0f6ef74f6c0cf3e42edb42693c3914ef051eb148 Mon Sep 17 00:00:00 2001 From: abhishekbhakat Date: Fri, 19 Dec 2025 17:46:54 +0530 Subject: [PATCH] feat: add user profile page with editable physical info and lifestyle settings --- frontend/src/App.tsx | 2 + frontend/src/index.css | 37 +++++ frontend/src/pages/Dashboard.tsx | 22 ++- frontend/src/pages/Profile.tsx | 252 +++++++++++++++++++++++++++++++ 4 files changed, 307 insertions(+), 6 deletions(-) create mode 100644 frontend/src/pages/Profile.tsx diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 6fd9721..6932a09 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -2,6 +2,7 @@ import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom' import { LoginPage } from './pages/Login' import { SignupPage } from './pages/Signup' import { Dashboard } from './pages/Dashboard' +import { ProfilePage } from './pages/Profile' function App() { return ( @@ -9,6 +10,7 @@ function App() { } /> } /> + } /> } /> } /> diff --git a/frontend/src/index.css b/frontend/src/index.css index ee4ab3b..604b1fb 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -285,4 +285,41 @@ a:hover { .btn:disabled { opacity: 0.6; cursor: not-allowed; +} + +/* Radio groups */ +.radio-group { + display: flex; + gap: var(--space-lg); +} + +.radio-label { + display: flex; + align-items: center; + gap: var(--space-xs); + cursor: pointer; + font-size: 14px; +} + +.radio-label input[type="radio"] { + accent-color: var(--accent); +} + +/* Success message */ +.success-message { + padding: var(--space-sm) var(--space-md); + background-color: color-mix(in srgb, var(--indicator-normal) 10%, transparent); + color: var(--indicator-normal); + border-radius: var(--radius-md); + font-size: 14px; + margin-bottom: var(--space-md); +} + +/* Select styling */ +select.input { + appearance: none; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2371717a' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); + background-repeat: no-repeat; + background-position: right 12px center; + padding-right: 36px; } \ No newline at end of file diff --git a/frontend/src/pages/Dashboard.tsx b/frontend/src/pages/Dashboard.tsx index e50d3d9..4143b50 100644 --- a/frontend/src/pages/Dashboard.tsx +++ b/frontend/src/pages/Dashboard.tsx @@ -1,5 +1,5 @@ import { useEffect, useState } from 'react' -import { useNavigate } from 'react-router-dom' +import { useNavigate, Link } from 'react-router-dom' interface User { id: number @@ -52,7 +52,10 @@ export function Dashboard() { return (
-

zhealth

+
+ zhealth +

zhealth

+
+ +
+ ) +}