We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8240cf commit c8a9056Copy full SHA for c8a9056
src/browser/modules/Stream/Auth/revealable-password-input.tsx
@@ -41,20 +41,16 @@ export default function RevealablePasswordInput({
41
)
42
}
43
44
-function useReveal(isRevealed: any) {
45
- const inputRef = useRef<any>(null)
+function useReveal(isRevealed: boolean) {
+ const inputRef = useRef<HTMLInputElement>(null)
46
47
useEffect(() => {
48
if (!inputRef.current) {
49
return
50
51
52
inputRef.current.type = isRevealed ? 'text' : 'password'
53
-
54
- return () => {
55
- inputRef.current.type = 'password'
56
- }
57
- }, [inputRef, isRevealed])
+ }, [isRevealed])
58
59
return inputRef
60
0 commit comments