From e62fc35d120dd441192fb8556ace800983b93a73 Mon Sep 17 00:00:00 2001 From: dotX12 Date: Sun, 26 Jan 2025 16:55:28 +0300 Subject: [PATCH] Rename onAccept, onReject functions; update useEffect dependencies in consentForm.tsx Fix: `./src/components/accountSessions.tsx 27:8 Warning: React Hook useCallback has a missing dependency: 'loadSessions'. Either include it or remove the dependency array. react-hooks/exhaustive-deps 50:8 Warning: React Hook useEffect has a missing dependency: 'loadSessions'. Either include it or remove the dependency array. react-hooks/exhaustive-deps` --- authentication/src/components/consentForm.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/authentication/src/components/consentForm.tsx b/authentication/src/components/consentForm.tsx index eb3f7a2..60a43cb 100644 --- a/authentication/src/components/consentForm.tsx +++ b/authentication/src/components/consentForm.tsx @@ -13,15 +13,15 @@ import { Button } from '@/components/ui/button'; interface ConsentFormProps { request: OAuth2ConsentRequest; - onAccept: (challenge: string, scopes: string[], remember: boolean) => void; - onReject: (challenge: string) => void; + onAcceptAction: (challenge: string, scopes: string[], remember: boolean) => void; + onRejectAction: (challenge: string) => void; } export default function ConsentForm( { request, - onAccept, - onReject, + onAcceptAction, + onRejectAction, }: ConsentFormProps, ) { @@ -37,7 +37,7 @@ export default function ConsentForm( .toSession() .then(({ data }) => setSession(data)) .catch(() => router.push('/flow/login')); - }, []); + }, [router]); return ( <> @@ -106,12 +106,12 @@ export default function ConsentForm(