Full rewrite of /profile with a cleaner layout and nicer polish.
Layout:
- Removed the sidebar 'user info' card; replaced with a horizontal hero
at the top: avatar (with premium badge overlay), name, email, logout
button, and 3 badges (plan, member since, recipe count)
- Tabs stretched full-width (no more 1/3 sidebar + 2/3 content split)
- Removed the 'Mes recettes' section from the bottom (redundant with
/recipes list page)
Hero:
- 24-28 Avatar with gradient fallback and ring-4 separator
- Premium crown icon overlay (Sparkles badge) if subscription != 'free'
- Badges: plan tier, member since (localized French date), recipe count
- Logout button moved up here, styled as ghost with red hover
Cuisine tab (the main improvement):
- Diet is now a 4-button segmented control instead of a native <select>
- Max time and servings inputs have suffix labels ('min', 'pers.')
- Equipment checkboxes replaced by visual tile buttons with emoji
icons, 2-col mobile / 4-col desktop, selected state = orange border +
bg. Hidden actual checkbox for accessibility.
- 'Actif' badge in the card header when any pref is set
- Rounded xl inputs (h-11), brand gradient submit button
Other tabs (Profil/Email/Sécurité):
- Consistent visual language: h-11 rounded-xl inputs, h-12 brand
gradient buttons, bolder labels
- Email tab shows current email in the description
- Improved placeholders
Alerts:
- Custom inline alerts with AnimatePresence, auto-dismiss after 4s for
success, dismissible X button, CheckCircle2/AlertCircle icons
- No more shadcn Alert component (simpler + branded colors)
Danger zone:
- Dedicated bordered section at the bottom with icon + explanation
- Delete button opens a proper Dialog (replaces prompt() hack)
- Dialog asks for password, has Cancel/Delete buttons
Mobile polish:
- Hero stacks avatar on top, centered
- Tab triggers show icon-only on mobile, icon+label on sm+
- All 4 diet buttons fit in 2 cols on mobile
- Equipment tiles also 2 cols on mobile
- Logout button full-width on mobile
Removed all unused imports: AvatarImage, Separator, CardFooter, Alert,
AlertTitle, AlertDescription. Cleaned up handlers that weren't needed
(inline setState in onChange).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
export default tseslint.config({
extends: [
// Remove ...tseslint.configs.recommended and replace with this
...tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
...tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
...tseslint.configs.stylisticTypeChecked,
],
languageOptions: {
// other options...
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
},
})
You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'
export default tseslint.config({
plugins: {
// Add the react-x and react-dom plugins
'react-x': reactX,
'react-dom': reactDom,
},
rules: {
// other rules...
// Enable its recommended typescript rules
...reactX.configs['recommended-typescript'].rules,
...reactDom.configs.recommended.rules,
},
})