feat: Introduce user profile service and enable role-based profile management for users and agents, including avatar uploads and a dismissible error message in the hero section.

This commit is contained in:
pradeepkumar
2026-02-01 00:50:09 +05:30
parent 1ec1696db7
commit c4afc421cf
6 changed files with 270 additions and 79 deletions

View File

@@ -70,6 +70,10 @@ export function HeroSection() {
setValidationError(null); // Clear error when user starts typing
};
const handleClearError = () => {
setValidationError(null);
};
return (
<section className="relative min-h-[600px] overflow-hidden">
{/* Background Image */}
@@ -169,9 +173,18 @@ export function HeroSection() {
{/* Validation Error Message */}
{validationError && (
<div className="mt-3 text-center">
<p className="text-white font-serif text-sm bg-red-500/90 rounded-[7px] py-2 px-4 inline-block">
{validationError}
</p>
<div className="text-white font-serif text-sm bg-red-500/90 rounded-[7px] py-2 px-4 inline-flex items-center gap-3">
<span>{validationError}</span>
<button
onClick={handleClearError}
className="hover:bg-white/20 rounded-full p-0.5 transition-colors"
title="Dismiss"
>
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M18 6L6 18M6 6L18 18" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
</svg>
</button>
</div>
</div>
)}