hf: lint fixes
This commit is contained in:
parent
8c56456911
commit
006d91eedd
@ -17,6 +17,6 @@ async function getChallenge() {
|
||||
return NextResponse.json(challenge)
|
||||
}
|
||||
|
||||
export async function GET(request: Request) {
|
||||
export async function GET() {
|
||||
return getChallenge()
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
"use client"
|
||||
|
||||
import React, { useState, useRef, useEffect } from "react"
|
||||
import React, { useState, useRef, useEffect, useCallback } from "react"
|
||||
import { Input } from "@/components/ui/input"
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { Label } from "@/components/ui/label"
|
||||
@ -139,7 +139,7 @@ export function ChangeAuthentikPassword() {
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
const handleHoldEnd = () => {
|
||||
const handleHoldEnd = useCallback(() => {
|
||||
if (holdTimeoutRef.current) {
|
||||
clearTimeout(holdTimeoutRef.current)
|
||||
holdTimeoutRef.current = null
|
||||
@ -154,7 +154,7 @@ export function ChangeAuthentikPassword() {
|
||||
intervalRef.current = null
|
||||
}
|
||||
}
|
||||
}
|
||||
}, [isHolding, controls])
|
||||
|
||||
useEffect(() => {
|
||||
return () => {
|
||||
@ -173,7 +173,7 @@ export function ChangeAuthentikPassword() {
|
||||
setLoading(false)
|
||||
setNewPassword("")
|
||||
}
|
||||
}, [open])
|
||||
}, [open, handleHoldEnd])
|
||||
|
||||
return (
|
||||
<Dialog open={open} onOpenChange={setOpen}>
|
||||
|
@ -1,6 +1,6 @@
|
||||
"use client"
|
||||
|
||||
import React, { useState, useRef, useEffect } from "react"
|
||||
import React, { useState, useRef, useEffect, useCallback } from "react"
|
||||
import { Input } from "@/components/ui/input"
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { Label } from "@/components/ui/label"
|
||||
@ -139,7 +139,7 @@ export function ChangeEmailPassword() {
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
const handleHoldEnd = () => {
|
||||
const handleHoldEnd = useCallback(() => {
|
||||
if (holdTimeoutRef.current) {
|
||||
clearTimeout(holdTimeoutRef.current)
|
||||
holdTimeoutRef.current = null
|
||||
@ -154,7 +154,7 @@ export function ChangeEmailPassword() {
|
||||
intervalRef.current = null
|
||||
}
|
||||
}
|
||||
}
|
||||
}, [isHolding, controls])
|
||||
|
||||
useEffect(() => {
|
||||
return () => {
|
||||
@ -173,7 +173,7 @@ export function ChangeEmailPassword() {
|
||||
setLoading(false)
|
||||
setNewPassword("")
|
||||
}
|
||||
}, [open])
|
||||
}, [open, handleHoldEnd])
|
||||
|
||||
return (
|
||||
<Dialog open={open} onOpenChange={setOpen}>
|
||||
|
Loading…
x
Reference in New Issue
Block a user