fix: Correct eye icon display logic for password and contact information visibility toggles.

This commit is contained in:
pradeepkumar
2026-03-08 00:39:05 +05:30
parent 7fca897e28
commit 037acd95c7
2 changed files with 5 additions and 5 deletions

View File

@@ -39,7 +39,7 @@ export function ContactInfo({ email, phone }: ContactInfoProps) {
onClick={() => setShowEmail(!showEmail)} onClick={() => setShowEmail(!showEmail)}
> >
<Image <Image
src={showEmail ? "/assets/icons/eye-off-icon.svg" : "/assets/icons/eye-icon.svg"} src={showEmail ? "/assets/icons/eye-icon.svg" : "/assets/icons/eye-off-icon.svg"}
alt={showEmail ? "Hide email" : "Show email"} alt={showEmail ? "Hide email" : "Show email"}
width={16} width={16}
height={16} height={16}
@@ -56,7 +56,7 @@ export function ContactInfo({ email, phone }: ContactInfoProps) {
onClick={() => setShowPhone(!showPhone)} onClick={() => setShowPhone(!showPhone)}
> >
<Image <Image
src={showPhone ? "/assets/icons/eye-off-icon.svg" : "/assets/icons/eye-icon.svg"} src={showPhone ? "/assets/icons/eye-icon.svg" : "/assets/icons/eye-off-icon.svg"}
alt={showPhone ? "Hide phone" : "Show phone"} alt={showPhone ? "Hide phone" : "Show phone"}
width={16} width={16}
height={16} height={16}

View File

@@ -148,7 +148,7 @@ export function PasswordSecurityForm({ onSave }: PasswordSecurityFormProps) {
className="absolute right-4 top-1/2 -translate-y-1/2 text-[#00293D]/50 hover:text-[#00293D] cursor-pointer" className="absolute right-4 top-1/2 -translate-y-1/2 text-[#00293D]/50 hover:text-[#00293D] cursor-pointer"
> >
<Image <Image
src={showPasswords.current ? '/assets/icons/eye-off-icon.svg' : '/assets/icons/eye-icon.svg'} src={showPasswords.current ? '/assets/icons/eye-icon.svg' : '/assets/icons/eye-off-icon.svg'}
alt={showPasswords.current ? 'Hide password' : 'Show password'} alt={showPasswords.current ? 'Hide password' : 'Show password'}
width={20} width={20}
height={20} height={20}
@@ -176,7 +176,7 @@ export function PasswordSecurityForm({ onSave }: PasswordSecurityFormProps) {
className="absolute right-4 top-1/2 -translate-y-1/2 text-[#00293D]/50 hover:text-[#00293D] cursor-pointer" className="absolute right-4 top-1/2 -translate-y-1/2 text-[#00293D]/50 hover:text-[#00293D] cursor-pointer"
> >
<Image <Image
src={showPasswords.new ? '/assets/icons/eye-off-icon.svg' : '/assets/icons/eye-icon.svg'} src={showPasswords.new ? '/assets/icons/eye-icon.svg' : '/assets/icons/eye-off-icon.svg'}
alt={showPasswords.new ? 'Hide password' : 'Show password'} alt={showPasswords.new ? 'Hide password' : 'Show password'}
width={20} width={20}
height={20} height={20}
@@ -207,7 +207,7 @@ export function PasswordSecurityForm({ onSave }: PasswordSecurityFormProps) {
className="absolute right-4 top-1/2 -translate-y-1/2 text-[#00293D]/50 hover:text-[#00293D] cursor-pointer" className="absolute right-4 top-1/2 -translate-y-1/2 text-[#00293D]/50 hover:text-[#00293D] cursor-pointer"
> >
<Image <Image
src={showPasswords.confirm ? '/assets/icons/eye-off-icon.svg' : '/assets/icons/eye-icon.svg'} src={showPasswords.confirm ? '/assets/icons/eye-icon.svg' : '/assets/icons/eye-off-icon.svg'}
alt={showPasswords.confirm ? 'Hide password' : 'Show password'} alt={showPasswords.confirm ? 'Hide password' : 'Show password'}
width={20} width={20}
height={20} height={20}