fix state issue which resulted in text edits causing repeated focus loss

This commit is contained in:
Chad Curtis committed 2025-07-14 07:23:33 +00:00
1 parent 230183bd0c
commit 0484b10a96
2 files changed
+212 -156

No files matched your search

+6 -1
View File
@@ -1,4 +1,4 @@
import { useState, useMemo, useEffect } from 'react';
import { useState, useMemo, useEffect, useCallback } from 'react';
import { useCurrentUser } from '@/hooks/useCurrentUser';
import { useAuthor } from '@/hooks/useAuthor';
import { useAppContext } from '@/hooks/useAppContext';
@@ -303,6 +303,10 @@ export function useZaps(
}
};
const resetInvoice = useCallback(() => {
setInvoice(null);
}, []);
return {
zaps,
zapCount,
@@ -312,5 +316,6 @@ export function useZaps(
isZapping,
invoice,
setInvoice,
resetInvoice,
};
}