From be36ee33a5e06c53a8100fde6497ae01d7771a22 Mon Sep 17 00:00:00 2001 From: lftobs Date: Sat, 20 Jul 2024 17:33:23 +0100 Subject: [PATCH] feat(116):user-dashboard-password-settings (completed password update functionality-final) --- app/components/dashboard/PasswordUpdate.tsx | 7 +++---- app/routes/dashboard.password-settings/route.tsx | 1 - 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/components/dashboard/PasswordUpdate.tsx b/app/components/dashboard/PasswordUpdate.tsx index 4269e4df..6645bde1 100644 --- a/app/components/dashboard/PasswordUpdate.tsx +++ b/app/components/dashboard/PasswordUpdate.tsx @@ -1,6 +1,6 @@ -import { FunctionComponent, useEffect, useState, useRef } from "react"; +import { useEffect, useState } from "react"; import { Form } from "@remix-run/react"; -import { Check, EyeOff, Eye, CircleCheck } from 'lucide-react'; +import { EyeOff, Eye, CircleCheck } from 'lucide-react'; import { Button } from "../ui/button"; import { AlertDialog, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from "../ui/alert-dialog"; @@ -14,7 +14,6 @@ const PasswordUpdate = () => { const [showPassword, setShowPassword] = useState(false); const [showNewPassword, setShowNewPassword] = useState(false); const [showConfirmPassword, setShowConfirmPassword] = useState(false); - const inputRef = useRef(null) const [validation, setValidation] = useState({ hasUppercase: false, hasNumber: false, @@ -46,7 +45,7 @@ const PasswordUpdate = () => { const handleChange = (event: React.ChangeEvent) => { event.preventDefault() const { name, value } = event.target; - let val: keyof PasswordValues = name as keyof PasswordValues + const val: keyof PasswordValues = name as keyof PasswordValues setActualValue((prevActualValue) => ({ ...prevActualValue, diff --git a/app/routes/dashboard.password-settings/route.tsx b/app/routes/dashboard.password-settings/route.tsx index f8fb3ecf..ad9df52f 100644 --- a/app/routes/dashboard.password-settings/route.tsx +++ b/app/routes/dashboard.password-settings/route.tsx @@ -1,4 +1,3 @@ -import React from 'react' import PasswordUpdate from '~/components/dashboard/PasswordUpdate' const DaashboardPasswordSettings = () => {